MySQL server has gone awaysyntax error: SELECT count(c.id) as soluong,id_sanpham,p.id,c.ten,c.photo FROM table_chitietdonhang c,table_product p where p.id = c.id_sanpham and id_sanpham>0 and p.hienthi > 0 GROUP BY id_sanpham order by soluong desc limit 0,3