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 '' at line 1
------------------------------------
SELECT p.*,d.* FROM tbl_packages_cats AS p LEFT JOIN tbl_packages_cats_data as d ON p.cat_id = d.cat_id LEFT JOIN tbl_packages_cats_pkg_data as d1 ON p.cat_id = d1.cat_id WHERE d.lang_id='1' AND d.cat_id=