return to tranceaddict TranceAddict Forums Archive > Main Forums > Chill Out Room

 
Calling all MySql geeks...
View this Thread in Original format
Swamper
Seems that the 5.0.x branch handles certain queries differently than 4.0/4.1 - and old code that was once fine is coming back with query errors.

I don't know what else on TA is broken, but search is (for now), see here:
code:
SELECT DISTINCT post.userid, thread.threadid,thread.threadid AS postid,thread.title AS threadtitle,thread.iconid AS threadiconid,thread.replycount, thread.views,thread.pollid,thread.open,thread.lastpost AS postdateline,thread.lastpost,thread.lastposter, forum.forumid, forum.title AS forumtitle,forum.allowicons,attach, thread.postusername AS usrname, user.userid AS postuserid, threadicon.iconpath AS threadiconpath,threadicon.title AS threadicontitle FROM thread,forum LEFT JOIN user ON user.username=thread.postusername LEFT JOIN icon AS threadicon ON thread.iconid=threadicon.iconid LEFT JOIN post ON (thread.threadid = post.threadid AND post.userid = '2' AND post.visible = 1) WHERE thread.forumid=forum.forumid AND thread.threadid IN (0,367269,342963,355702) ORDER BY thread.lastpost DESC mysql error: Unknown column 'thread.postusername' in 'on clause' mysql error number: 1054


^^ which makes no sense, since 'postusername' is a field within the thread table.

I'll try to figure this out over the next few days though...

Edit: found the problem - http://dev.mysql.com/doc/refman/5.0/en/join.html - now to make the changes.
CLICK TO RETURN TO TOP OF PAGE
 
Privacy Statement