Replacing Text in a MySQL Database Using PHP
By Ben Sinclair2005-04-19
Replacing Text In A MySQL Database Using PHP
If you have 10+ of rows with the name Ben in it, it could take a while having to modify each table manually...
Here is a quick and easy way to do it all at once with some simple PHP and MySQL:
<?phpReplace table_name and text with your own database fields and you're all set!
// Connect to your MySQL Database here etc...
// Now with the MySQL Query
mysql_query("update table_name set text=REPLACE(text,'Ben','Jim')");
// Rest of your PHP code...
?>
Pretty simple huh?
Enjoy! :)
Tutorial pages:
|
|
|||||||||
You might also want to check these out:
|
Leave a Comment on "Replacing Text in a MySQL Database Using PHP"
You must be logged in to post a comment.
Link to This Tutorial Page!

