Query failed: 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 'GROUP BY A.no DESC LIMIT 0, 20' at line 1 Actual query: SELECT A.no,A.kat_no,A.urun_adi,A.indirim_aktif,A.indirimli_fiyati,A.satis_fiyati,A.indirimli_fiyati,A.para_birimi,B.t100,B.t50,B.t200,B.t500 from urunler A LEFT JOIN resimler B ON A.gal_no=B.galeri_no WHERE A.aktif_pasif=1 AND A.marka_no= GROUP BY A.no DESC LIMIT 0, 20