Find & replace in MySQL

364 views Asked by At

My forum has a few hundred users that have an identical expired signature from several years ago that looks like this:

[img]http://url.com/~expiredimage.jpg[/img]

The [img] tags are BBCode used to display images in the forum's script. The forum software is XenForo.

Is there a way I can mass delete all of these signatures from phpMyAdmin? If so, can you please tell me with the exact steps and query to run?

2

There are 2 answers

1
D Mac On

If any occurrence of 'expiredimage.jpg' needs to be changed, you can do it directly with

UPDATE tablename set signature = 'new signature that you want them to have'
WHERE signature like '%expiredimage.jpg%';

That will change anybody with a signature that references expiredimage.jpg to the signature you specify in the query.

1
Marc Delisle On

phpMyAdmin 4.1 has a Find and replace feature, under the table Search menu.