mysql search and replace

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
deras
Forum Newbie
Posts: 24
Joined: Sun Nov 02, 2003 10:26 am

mysql search and replace

Post 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)
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Use an UPDATE query:

Code: Select all

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