sandy1028 Posted June 29, 2009 Share Posted June 29, 2009 Hi, How to select all the rows which has a string ‘&rd’ in a field and update all the rows with the string &rd to single quote in SQL. Link to comment https://forums.phpfreaks.com/topic/164067-select-and-update/ Share on other sites More sharing options...
jackpf Posted June 29, 2009 Share Posted June 29, 2009 UPDATE TABLE SET field=REPLACE(field, '&rd', '\'') Link to comment https://forums.phpfreaks.com/topic/164067-select-and-update/#findComment-865497 Share on other sites More sharing options...
jackpf Posted June 29, 2009 Share Posted June 29, 2009 That single quote is supposed to have a backslash btw. Stupid code highlighter must have stripped it. Link to comment https://forums.phpfreaks.com/topic/164067-select-and-update/#findComment-865498 Share on other sites More sharing options...
sandy1028 Posted July 1, 2009 Author Share Posted July 1, 2009 How to write a query which select field called ids from the table if it has any of the strings like '%”%','%’%','%“%','%‘%' in a row. Please tell me how to query a table as above Link to comment https://forums.phpfreaks.com/topic/164067-select-and-update/#findComment-866933 Share on other sites More sharing options...
abdfahim Posted July 1, 2009 Share Posted July 1, 2009 Select id from table_name WHERE field_name IN ('%”%','%’%','%“%','%‘%') Link to comment https://forums.phpfreaks.com/topic/164067-select-and-update/#findComment-866938 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.