Page 1 of 1

mysql search and replace

Posted: Thu Jan 22, 2004 1:12 am
by deras
i want to do a search and replace in mysql. what is the method for that?

Select
FROM members
WHERE 1 AND local_icon = "icons/.gif"

i want to replace "icons/.gif" and with "" (i.e. delete some bad icon locations)

Posted: Thu Jan 22, 2004 3:40 am
by twigletmac
Use an UPDATE query:

Code: Select all

UPDATE members SET local_icon='' WHERE local_icon='icons/.gif'
Mac