2017-04-28, 01:52 PM
Hello,
I use this code to show latest threads/posts (from portal.php).
How could I add one more query to sort by prefix too?
Where can I get a "matching" variable for it?
Thanks for help!
I use this code to show latest threads/posts (from portal.php).
$read_from_forum = " AND t.fid IN ('1','2','3','4','5')";
$query = $db->query("
SELECT t.*, t.tid, t.fid, t.uid, t.lastpost, t.lastposteruid, t.lastposter, t.subject, t.replies, t.views, u.username
FROM ".TABLE_PREFIX."threads t
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=t.uid)
WHERE 1=1 {$excludeforums}{$tunviewwhere}{$read_from_forum} AND t.visible='1' AND t.closed NOT LIKE 'moved|%'
ORDER BY t.lastpost DESC
LIMIT 0, ".$mybb->settings['portal_showdiscussionsnum']
);
https://community.mybb.com/thread-210058.htmlHow could I add one more query to sort by prefix too?
Where can I get a "matching" variable for it?
Thanks for help!