WebDev

Webdevelop => General Code/Script Inquiries => Topic started by: Aaron on February 16, 2026, 11:34:41 AM

Title: MySQL decrement number within tags
Post by: Aaron on February 16, 2026, 11:34:41 AM
Hello, on my SMF forum I have posts that are numbers within [embed][/embed] tags, example:

[embed]1[/embed]
[embed]2[/embed]
[embed]3[/embed]
[embed]4[/embed]

I have over 10,000 of these but need to remove some and need to decrement the numbers that are above this amount, such as 9001~9500, so that 9501 then becomes 9001 and 9502 becomes 9002 etc.

These are only in the smf_messages table of course.

Is it possible to do this in phpmyadmin with regex or would I need to download the .sql database and do it with something else?

Thanks.
EhPortal 1.40.0-RC3 © 2026, WebDev