The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
sql problem (sorta! :))
Code:
SELECT MAX(thread.title) as ttitle,MAX(thread.dateline) as dateline,MAX(thread.threadid) as threadid,MAX(thread.replycount) as comments,MAX(thread.lastpost) as lastpost,forum.forumid,forum.title,forum.description,forum.parentid FROM thread INNER JOIN forum USING (forumid) GROUP BY forum.forumid HAVING forum.parentid=8 ORDER BY dateline DESC But all subsequent forums that it returns(still in the correct order of latest "thread"), it returns the first thread of that forum, not the latest. I can do it with a sub-select, but mysql doesnt support that. Any thoughts? |
#2
|
|||
|
|||
Okay, looking through my code, i see my max() is wrong.
Max returns the thread title that has the "highest" name, ie, starts with a W/X/Y/Z.. Which is _not_ what i want I had it working before, but there was a SQL query per entry, which added around 24 queries per page, which i dont want to do Any ideas? |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|