JdS
Sun 29th Sep '02, 7:12pm
Hi,
I couldn't use the 'Latest Topics' hack off vBulletin.org because I needed the data for my template class and besides i wanted the query to leave out all private forums without me having to define them in the script.... so this is what i came up with:
SELECT thread.title, thread.threadid
FROM thread, forum LEFT JOIN access
ON forum.forumid = access.forumid
WHERE access.forumid IS null
AND thread.forumid = forum.forumid
ORDER BY thread.lastpost DESC
LIMIT 5
but using explain, i realise that it's probably not the best way to get the data.
anyone have a better idea or is this pretty much it? all i need is the thread title and id as you can see.
Thank you.
I couldn't use the 'Latest Topics' hack off vBulletin.org because I needed the data for my template class and besides i wanted the query to leave out all private forums without me having to define them in the script.... so this is what i came up with:
SELECT thread.title, thread.threadid
FROM thread, forum LEFT JOIN access
ON forum.forumid = access.forumid
WHERE access.forumid IS null
AND thread.forumid = forum.forumid
ORDER BY thread.lastpost DESC
LIMIT 5
but using explain, i realise that it's probably not the best way to get the data.
anyone have a better idea or is this pretty much it? all i need is the thread title and id as you can see.
Thank you.