the simplemachines forum script, SMF, quotes posts using the following syntax :
vbulletin uses a much simpler form
I have converted from SMF to vbulletin. The converter does NOT take care of this specific point.
We can easily do this as the converter nicely created a "importpostid " column in the post table. so we know exactly what every postid was before and is after the conversion.
Similarly, the user table, you have userid and importuserid
Hence I need your help with this to do the following replace in the post table in the pagetext column:
I of course tried the above, but this did not work.
any help ??
Code:
[quote author=userID link=topic=topicID.msgPOSTID#msgPOSTID date=1165585121]
vbulletin uses a much simpler form
Code:
[QUOTE=userID;postID]
I have converted from SMF to vbulletin. The converter does NOT take care of this specific point.
We can easily do this as the converter nicely created a "importpostid " column in the post table. so we know exactly what every postid was before and is after the conversion.
Similarly, the user table, you have userid and importuserid
Hence I need your help with this to do the following replace in the post table in the pagetext column:
Code:
[SIZE=1]UPDATE post p SET pagetext = REPLACE( pagetext, concat('[quote author=', (select importuserid from user u where u.userid = p.userid), ' postid=', p.importpostID, ']'), concat('[quote=', p.userID,';',p.postID,']') ); /* select concat('[quote author=', (select importuserid from user u where u.userid = p.userid), 'postid=', p.importpostID, ']'), concat('[quote=', p.userID,';',p.postID,']') from post p; */ [/SIZE]
I of course tried the above, but this did not work.
any help ??
Comment