I have two questions regarding the REPLACE command.
The first query I am running is
[CODE]update phpbb_posts set post_text = replace(post_text, '[del]', '[ b][ i]')
update phpbb_posts set post_text = replace(post_text, '[/del]', '[/i][/b]')[/CODE]
Note - in the above code I have had to add a space before the b] and i] on line 1 as just doing it with a [ was marking the text bold and italic. I did try different ways of wrapping but couldn't get it to display properly.
and this gives a syntax error of
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'update posts set post_text = replace(post_text, '[/del]', '')' at line 2
Now from previous posts I am sure that this is beacause of the / character but I have tried // i.e.
update phpbb_posts set post_text = replace(post_text, '[//del]', '[//i][/b]')
but this gives the same error message.
I was hoping this was the easier query!
The second question is:
I want to run a similar replace query to replace:
[quote author="magicmarkuk" date="1315007444"]
from date onwards will always be 17 characters but of course the author name can be different.
Any help as ever really appreciated.