lordvader Posted October 9, 2007 Share Posted October 9, 2007 I know you can do a query to find and replace all instance of let's say $haystack, $needle, with: UPDATE tablename SET tablefield = replace(tablefield,$haystack,$needle); but that only works for a specific table and a specific field within the table. What do I change so I can search and replace throught the entire database? Thanks Link to comment https://forums.phpfreaks.com/topic/72389-use-php-to-find-and-replace-in-entire-mysql-db/ Share on other sites More sharing options...
marcus Posted October 9, 2007 Share Posted October 9, 2007 UPDATE `tablename` SET `haystack`='$needle' WHERE `haystack` LIKE '%$haystack%' confusing question. replace what with what Link to comment https://forums.phpfreaks.com/topic/72389-use-php-to-find-and-replace-in-entire-mysql-db/#findComment-365090 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.