Jump to the post that solved this thread.
Solved: 4 Years, 5 Months, 2 Weeks ago Latest threads/posts from one category
#1
Solved: 4 Years, 5 Months, 2 Weeks ago
Hello,
I dont know how could I change this mysql code to show latest threads/post from only one forum category.
For example  I have 5 category on my forum, but I want to show latest threads/post from one category.

Where should I add cat id in this query (portal.php)?
$query = $db->query("
		SELECT 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} AND t.visible='1' AND t.closed NOT LIKE 'moved|%'
		ORDER BY t.lastpost DESC
		LIMIT 0, ".$mybb->settings['portal_showdiscussionsnum']
	);

Thanks for help!
Reply
Jump to the post that solved this thread.


Messages In This Thread
Latest threads/posts from one category - by DeepSea - 2017-04-27, 01:39 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)