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 'ORDER BY a.date_added DESC' at line 1 in SELECT a.*, b.categ_name FROM ec_press_releases_archive h, ec_press_releases a LEFT JOIN ec_categories b ON a.categ_id = b.id WHERE a.id = h.comunicat_id AND a.status = 1 AND h.user_id = ORDER BY a.date_added DESC