Daily Lucky Numbers:
1
4
9
25
36
48

MySQL decrement number within tags

Started by Aaron, Today at 11:34:41 AM

Previous topic - Next topic

Aaron

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.