SELECT * FROM news AS N LEFT JOIN news_lines AS NL ON N.news_id = NL.news_id LEFT JOIN sys_status AS SS ON N.status = SS.status_id WHERE N.news_id <> AND N.news_date <= NOW() AND N.status = 1 AND NL.language_id = 'pt' ORDER BY RAND() LIMIT 2
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND N.news_date <= NOW() AND N.status = 1 AND NL.language_id = 'pt' ORDER BY RAN' at line 1