
04-19-2002, 02:13 PM
|
|
|
Join Date: Nov 2001
Posts: 557
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
Quote:
Originally posted by GK_ng
as this Hack added a bunch of Queries, I did a redesign of this genious hack:
replace it with
Code:
SELECT $dotuserid $votequery ".iif($foruminfo[allowicons],'icon.title as icontitle,icon.iconpath,','')."
thread.threadid,thread.title,lastpost, forumid,pollid,open,replycount,postusername,postuserid,
lastposter,thread.dateline,views,thread.iconid,notes,thread.visible,sticky,votetotal,attach,subscribethread.subscribethreadid AS subscribed
FROM thread
LEFT JOIN subscribethread
ON (subscribethread.threadid=thread.threadid AND subscribethread.userid='".$bbuserinfo['userid']."')
".iif($foruminfo[allowicons],'LEFT JOIN icon ON (icon.iconid = thread.iconid)','')."
$dotjoin
WHERE $threadids
ORDER BY sticky DESC, $sortfield $sqlsortorder
");
Full Credits to mvigod for the idea and the first release of this hack ...
|
Excuse me, GK_ng...
Just something.
Are you sure if inserting such a LEFT JOIN between
thread and subscribethread tables,
the later LEFT JOIN with the icon table
would be run correctly ?
I'm just thinking... what about you ?
Thanks
|