SQL Code
$query = $db->query('
SELECT a.aid, a.name, a.image, p.uid
FROM '.TABLE_PREFIX.'ougc_awards a
JOIN '.TABLE_PREFIX.'ougc_awards_users ag ON (ag.aid=a.aid)
JOIN '.TABLE_PREFIX.'posts p ON (p.uid=ag.uid)
WHERE p.'.$pids.' AND a.visible=\'1\' AND a.type!=\'1\'
ORDER BY ag.date desc'
);
|
i want to limit the number of rows by UID, how?
xD
Now seriously, I have no idea. Some clue please?
Yes that is what I mean, limiting by UID and not as a general limit. Looking at the code seems like a complex query.
Thanks.
Do you think a query similar to that will significantly affect performance in threads?
Follow the link in the answer - there's some discussion on that.
Probably not much, but I'd trust his investigation more than my intuition.