kall
03-03-2005, 04:57 PM
Hellooo!
At the moment, the query is running inside my phpinclude_start template, and is pretty much just:
$headerposts = $DB_site -> query ("SELECT post.postid,post.username,post.title,post.userid,p ost.dateline,thread.title as threadtitle,thread.threadid,thread.forumid
FROM ".TABLE_PREFIX."post AS post
LEFT JOIN ".TABLE_PREFIX."thread AS thread ON thread.threadid=post.threadid
WHERE thread.visible=1
ORDER BY post.dateline DESC
LIMIT 0,50");
There's more, but that's the gist of it.
It would be nice if I could optimise it a bit...is the data I need (latest thread/latest post-title, url, posted by.) available any other way? Possibly using the datastore?
At the moment, the query is running inside my phpinclude_start template, and is pretty much just:
$headerposts = $DB_site -> query ("SELECT post.postid,post.username,post.title,post.userid,p ost.dateline,thread.title as threadtitle,thread.threadid,thread.forumid
FROM ".TABLE_PREFIX."post AS post
LEFT JOIN ".TABLE_PREFIX."thread AS thread ON thread.threadid=post.threadid
WHERE thread.visible=1
ORDER BY post.dateline DESC
LIMIT 0,50");
There's more, but that's the gist of it.
It would be nice if I could optimise it a bit...is the data I need (latest thread/latest post-title, url, posted by.) available any other way? Possibly using the datastore?