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 p.prod_visible='yes' ORDER BY prod_order, p.prod_name ASC' at line 1
SELECT p . *, c.cat_name as par_name,c.cat_desc as p_desc, s.cat_desc as s_desc, s.cat_name, s.cat_image FROM shop_cats c,shop_cats s, shop_prod p WHERE c.cat_id = s.cat_parent and s.cat_id=p.prod_sub and p.prod_id= and p.prod_visible='yes' ORDER BY prod_order, p.prod_name ASC