Jump to content

update string in database. Using REPLACE


denoteone

Recommended Posts

below is the mysql query I am trying to run to update all the URL's in my database field.

 

update content_type_press set field_press_body_value = replace(field_press_body_value, ‘1%21_cache-caching.php’, ‘caching.php’);

 

this is the error I am getting. #1054 - Unknown column '‘1' in 'field list'

 

Could it have something to do with the "%"  because when I inserted the string into the database it was actually  1!_cache-caching.php

Link to comment
https://forums.phpfreaks.com/topic/209109-update-string-in-database-using-replace/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.