SMF Support > Converting to SMF
Question on SQL + SMF2
LakeXeno:
Hey everyone, after converting from punbb to SMF2 now all my apostrophes ( ' ) have been escaped to look like: \'
Is there any SQL command I can possibly use? I have something like 18k topics to now skim over!!! :(
LOL. Any help would be greatly appreciated.
:o :P
Doctor Deejay:
Hi, welcome to SMF! :)
I have moved your topic to the conversion board, just so you know. :)
Tony Reid:
Well, you can use the word censor to swap it out, at least that way the users do not see it.
Alternatively, you probably want to use replace...something like this
--- Code: ---update TABLE set FIELD= replace(FIELD,"\'","'") where ID=1
--- End code ---
table would probably be smf_messages and field would probably be something like body and id will be the message id (to test on a single message). If it works on a single message then remove the 'where ID=1' and it will do all of them.
However it is not tested and field names are not accurate - its just enough code to give you an idea!!!
LakeXeno:
--- Quote from: Dr. Deejay on June 08, 2012, 10:48:44 AM ---Hi, welcome to SMF! :)
I have moved your topic to the conversion board, just so you know. :)
--- End quote ---
Oh, thanks. Still trying to get my head around it all. :)
LakeXeno:
--- Quote from: Tony Reid on June 08, 2012, 11:00:44 AM ---Well, you can use the word censor to swap it out, at least that way the users do not see it.
Alternatively, you probably want to use replace...something like this
--- Code: ---update TABLE set FIELD= replace(FIELD,"\'","'") where ID=1
--- End code ---
table would probably be smf_messages and field would probably be something like body and id will be the message id (to test on a single message). If it works on a single message then remove the 'where ID=1' and it will do all of them.
However it is not tested and field names are not accurate - its just enough code to give you an idea!!!
--- End quote ---
Would the word switch out be resource intensive? I'm on a small board (12k posts, 40-50 daily users) on shared hosting.
Navigation
[0] Message Index
[#] Next page
Go to full version