Best of joomla gives you news, joomla templates, tutorials and websites about Joomla , FireBoard and FireMessage official page.
| No account yet?   |
Welcome, Guest
Please Login or Register.    Lost Password?
FireBoard Manual Latest release discussions Download FireBoard Spread FireBoard!
mysql search and replace with wildcards (1 viewing) (1) Guest
Go to bottom Favoured: 0
TOPIC: mysql search and replace with wildcards
#37817
mysql search and replace with wildcards 9 Months ago  
hi, sorry if this is the wrong area, but i was wondering if someone could help me with this.

tonight i converted my phpbb3 board to fireboard, and everything went smoothly, except for the bbcodes, which all look like this now:

[code:1]example:
[quote="johndoe":39485736] and [/quote:39485736][/code:1]

this would be easy enough to do a search and replace on like so:

[code:1]UPDATE jos_fd_messages_text SET messages = replace(messages,":39485736",""«»);[/code:1]

BUT, the number for EVERY INSTANCE of the bbcode is completely unique/random for that instance. so, doing the search and replace above only replaces that one instance.

so.... what ive been trying to do is:

[code:1]UPDATE jos_fd_messages_text SET messages = replace(messages,":%]","]"«»);[/code:1]

using the % mysql wildcard inbetween the characters the numbers fall between. this turns up no results tho, and no changes.

the number is always 8 digits... not sure if that helps.

so, i was just wondering if anyone out there knew how to accomplish this with the wildcard in between characters.

thanks in advance!
mattpist (User)
Fresh Boarder
Posts: 12
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
The administrator has disabled public write access.  
Go to top