useful-php-scripts icon indicating copy to clipboard operation
useful-php-scripts copied to clipboard

extra for loop

Open Matiaan opened this issue 6 years ago • 2 comments

the loop on line 16 in "my-sql-export (backup) database.php" is not necessary since it already loops through the columns on line 19. for ($i = 0, $st_counter = 0; $i < $fields_amount; $i++, $st_counter=0)

It wont cause any issues, since the next statement goes to the next row, so after you've gone through the first column in this loop, all the rows would have been visited.

Matiaan avatar Jun 09 '18 11:06 Matiaan

Hi Matiaan, thanks for recommendation! When I have time, I will test the execution and merge the change !

ttodua avatar Jun 09 '18 18:06 ttodua

In the line 22, ($TableMLine[1]=str_ireplace('CREATE TABLE ','CREATE TABLE IF NOT EXISTS ',$TableMLine[1])) is not working.
The string CREATE TABLE isn't replace with CREATE TABLE IF NOT EXISTS.

valentesolucoes avatar Jan 27 '19 11:01 valentesolucoes