$sqlsortorder error
MOD Information
The Developer
|
|
|
Version: , by Boofo
Developer Last Online: Jun 2012
| Version: Unknown |
Rating:
|
| Released: 03-08-2003 |
Last Update: Never |
Installs: 0 |
|
|
|
|
No support by the author. |
Can anyone please tell me why this code will work:
PHP Code:
$threads=$DB_site->query("
SELECT $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,description,slippery
FROM thread
".iif($foruminfo[allowicons],'LEFT JOIN icon ON (icon.iconid = thread.iconid)','')."
WHERE $threadids
ORDER BY RAND(NOW()), $sortfield $sqlsortorder
");
But this won't? Ity gives me the dreaded 1064 syntax error. I know it has to do the the $sqlsortorder. I want to be able to randomize the listing bit still have any sticky threads show up at the top.
PHP Code:
$threads=$DB_site->query("
SELECT $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,description,slippery
FROM thread
".iif($foruminfo[allowicons],'LEFT JOIN icon ON (icon.iconid = thread.iconid)','')."
WHERE $threadids
ORDER BY sticky RAND(NOW()) , $sortfield $sqlsortorder
");
Show Your Support
-
If you like to thanks you by the author -> Click Thanks to the Author
- This modification may not be copied, reproduced or published elsewhere without author's permission.
|