SQL: (SELECT t.*, f.name FROM [Table]threads t LEFT JOIN [Table]forums f ON f.fid = t.fid WHERE t.fid='2' AND t.closed NOT LIKE 'moved|%' AND t.displayorder>=0 ORDER BY t.dateline DESC LIMIT 3) UNION (SELECT t.*, f.name FROM [Table]threads t LEFT JOIN [Table]forums f ON f.fid = t.fid WHERE t.fid='4' AND t.closed NOT LIKE 'moved|%' AND t.displayorder>=0 ORDER BY t.dateline DESC LIMIT 3) UNION (SELECT t.*, f.name FROM [Table]threads t LEFT JOIN [Table]forums f ON f.fid = t.fid WHERE t.fid='5' AND t.closed NOT LIKE 'moved|%' AND t.displayorder>=0 ORDER BY t.dateline DESC LIMIT 3) UNION (SELECT t.*, f.name FROM [Table]threads t LEFT JOIN [Table]forums f ON f.fid = t.fid WHERE t.fid='6' AND t.closed NOT LIKE 'moved|%' AND t.displayorder>=0 ORDER BY t.dateline DESC LIMIT 3) UNION (SELECT t.*, f.name FROM [Table]threads t LEFT JOIN [Table]forums f ON f.fid = t.fid WHERE t.fid='8' AND t.closed NOT LIKE 'moved|%' AND t.displayorder>=0 ORDER BY t.dateline DESC LIMIT 3) UNION (SELECT t.*, f.name FROM [Table]threads t LEFT JOIN [Table]forums f ON f.fid = t.fid WHERE t.fid='9' AND t.closed NOT LIKE 'moved|%' AND t.displayorder>=0 ORDER BY t.dateline DESC LIMIT 3) UNION (SELECT t.*, f.name FROM [Table]threads t LEFT JOIN [Table]forums f ON f.fid = t.fid WHERE t.fid='10' AND t.closed NOT LIKE 'moved|%' AND t.displayorder>=0 ORDER BY t.dateline DESC LIMIT 3) UNION (SELECT t.*, f.name FROM [Table]threads t LEFT JOIN [Table]forums f ON f.fid = t.fid WHERE t.fid='12' AND t.closed NOT LIKE 'moved|%' AND t.displayorder>=0 ORDER BY t.dateline DESC LIMIT 3) UNION (SELECT t.*, f.name FROM [Table]threads t LEFT JOIN [Table]forums f ON f.fid = t.fid WHERE t.fid='13' AND t.closed NOT LIKE 'moved|%' AND t.displayorder>=0 ORDER BY t.dateline DESC LIMIT 3) UNION (SELECT t.*, f.name FROM [Table]threads t LEFT JOIN [Table]forums f ON f.fid = t.fid WHERE t.fid='14' AND t.closed NOT LIKE 'moved|%' AND t.displayorder>=0 ORDER BY t.dateline DESC LIMIT 3) UNION (SELECT t.*, f.name FROM [Table]threads t LEFT JOIN [Table]forums f ON f.fid = t.fid WHERE t.fid='16' AND t.closed NOT LIKE 'moved|%' AND t.displayorder>=0 ORDER BY t.dateline DESC LIMIT 3) UNION (SELECT t.*, f.name FROM [Table]threads t LEFT JOIN [Table]forums f ON f.fid = t.fid WHERE t.fid='15' AND t.closed NOT LIKE 'moved|%' AND t.displayorder>=0 ORDER BY t.dateline DESC LIMIT 3)
Error: You have an error in your SQL syntax near '(SELECT t.*, f.name FROM [Table]threads t LEFT JOIN [Table]forums f ON f.fid = t.fid W' at line 1
Errno.: 1064 |