MyBB Community Forums

Full Version: How to reduce queries of this fetch
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is there a way to reduce queries of this fetch code??????



$query = $db->query("
		SELECT t.*, t.subject AS threadsubject, u.username, u.displaygroup,
		t.dateline AS threaddate, t.lastpost AS threadlastpost
		FROM ".TABLE_PREFIX."threads t
		LEFT JOIN ".TABLE_PREFIX."users u ON (t.lastposter=u.username)
		WHERE t.visible = '1' And t.uid = '{$memprofile['uid']}'
		GROUP BY t.tid
		ORDER BY threadlastpost DESC
		LIMIT 0, {$threadlimit}
	");
Do what?

This isn't a fetch code, it's 1 query and you can't reduce it to 0.
I am sorry as you know I have very little idea about all this but this code increases my queries from 14 to 56 with SEO plugin and to 1 without any idea how to fix that?

How to make it fetch prefix???

Thanks D666 for your assistance. I got this mother! LOL
the SEO plugin runs a query for a large number of the links on your page in order to make then "friendly"