How to use $this->db->empty_table() for many tables? |
[eluser]shinokada[/eluser]
I have 20 tables to empty. When I use it following the first one does not work. And the second method only empties the first table. What is the best way to empty many tables? Do I have empty one by one? Thanks in advance. Code: // first
[eluser]troy_mccormick[/eluser]
The manual only shows being able to pass in one table name at a time. Your best bet would be to loop through each table in that array like such: Code: <?php From the manual: Quote:$this->db->empty_table(); EDIT: Wouldn't it be better to run $this->db->truncate(); instead? I'm not sure...
[eluser]danmontgomery[/eluser]
Code: $tables = array ('table1','table2',...); |
Welcome Guest, Not a member yet? Register Sign In |