500 - JDatabaseMySQL::query: 1104 - The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay SQL=SELECT a.*, j.id AS userid, t.message AS messagetext, l.myfavorite, l.favcount, l.attachmesid, l.msgcount, l.lastid, u.avatar, c.id AS catid, c.name AS catname FROM ( SELECT m.thread, (f.userid IS NOT null AND f.userid='0') AS myfavorite, COUNT(DISTINCT f.userid) AS favcount, COUNT(a.mesid) AS attachmesid, COUNT(DISTINCT m.id) AS msgcount, MAX(m.id) AS lastid, MAX(m.time) AS lasttime FROM jos_fb_messages AS m LEFT JOIN jos_fb_favorites AS f ON f.thread = m.thread LEFT JOIN jos_fb_attachments AS a ON a.mesid = m.thread WHERE m.hold='0' AND m.moved='0' AND m.thread IN (1175,1174,1170,1171,1119,1165,1161,1164,5,1159,1158,1157,1147,1152,1074,1145,1133) GROUP BY thread ) AS l INNER JOIN jos_fb_messages AS a ON a.thread = l.thread INNER JOIN jos_fb_messages_text AS t ON a.thread = t.mesid LEFT JOIN jos_users AS j ON j.id = a.userid LEFT JOIN jos_fb_users AS u ON u.userid = j.id LEFT JOIN jos_fb_categories AS c ON c.id = a.catid WHERE (a.parent='0' OR a.id=l.lastid) ORDER BY lastid DESC