syntax error: select distinct p.* from table_product p inner join table_product_banggia g on p.id = g.id_p where p.hienthi = 1 and p.photo <> '' and g.hienthi > 0 and g.id_cat = and g.khoihanh >= CURDATE() order by g.khoihanh asc