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 languages_id=3 AND publication_id=86 AND datetime_stamp<>'0000-00-00' AND ((' at line 1
SELECT * FROM arraid2_news as main WHERE news_id_root=5071 AND parent_id= AND languages_id=3 AND publication_id=86 AND datetime_stamp<>'0000-00-00' AND (((publication_start='0000-00-00' OR CURDATE()>=publication_start) AND (publication_end='0000-00-00' OR CURDATE()<=publication_end)) OR (users_id_author=0 AND users_id_author<>0) OR 1=2) AND current_flag=1 AND isapproved>1 ORDER BY pwrord desc, newsdate desc,news_id desc,news_ord LIMIT 1