The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
||||
|
||||
mySQL - rename Post `title` to match Thread `title`
Can anyone advise some mysql queries to loop through the title of each thread in the thread table and, if the thread's corresponding posts in the post table have a different title, to update the post title to match the thread title?
Basically, I cannot understand how to loop through a table (have been Googling many pages on the matter). I'm assuming one would make a join on the two tables and then simply loop row-by-row based on thread title. For testing/viewing purposes on one forum, I've made the following query: HTML Code:
SELECT thread.threadid, thread.title, post.postid, post.title FROM thread JOIN post WHERE post.threadid = thread.threadid AND thread.forumid IN (174) AND thread.title != post.title ORDER BY thread.threadid, post.postid LIMIT 30 Does anyone know how to accomplish this using mysql? Thanks. -- Rik |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|