Table
*------------------------------------------------*
| id | title | filename |
*------------------------------------------------*
Lets say this is the structure of the table. I want to update every single row of this table.
Lets say i want to replace every space in Filename with a underscore.
$new_filename = str_replace(" ", "_", $filename);
mysql_query("UPDATE table SET Filename = '$new_filename'");
This does not work. Each row has different Filename.
I would simply do this:
This way you only execute one command and depending on your table size, this should be pretty quick
*edited