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 ((showCatIDs like '%|119|%' OR catID='119') AND (showCatIDs like '%|115|%'' at line 1select * from urun where urun.bakiyeOdeme=0 AND urun.active = 1 AND urun.active = 1 AND ((ID = 1743 OR ID = 1734 OR ID = 2042 OR ID = 2040 OR ID = 2041 OR ID = 1972 OR ID = 1766 OR ID = 1763 OR ID = 2016 OR ID = 1974 OR ID = 2017 OR ID = 2200 OR ID = 2030 OR ID = 2031 OR ID = 2032 OR ID = 2033 OR ID = 1711 OR ID = 1712 OR ID = 1713 OR ID = 1714 OR ID = 1731 OR ID = 1732 OR ID = 1773 OR ID = 1774 OR ID = 1775 OR ID = 1776 OR ID = 1777 OR ID = 1906 OR ID = 1907 OR ID = 1908 OR ID = 1935 OR ID = 1936 OR ID = 1937 OR ID = 1938 OR ID = 2029 OR ID = 2021 OR ID = 1745 OR ID = 1752 OR ID = 1759 OR ID = 1750 OR ID = 1744 OR ID = 1740 OR ID = 1760 OR ID = 1751 OR ID = 1748 OR ID = 1733 OR ID = 1758 OR ID = 1756 OR ID = 1746 OR ID = 1747 OR ID = 1761 OR ID = 1753 OR ID = 1757 OR ID = 1741 OR ID = 1754 OR ID = 1739 OR ID = 1742 OR ID = 1755 OR ID = 1738 OR ID = 2014 OR ID = 2044 OR ID = 1765 OR ID = 2063 OR ID = 2038 OR ID = 2037 OR ID = 2039 OR ID = 1973 OR ID = 1735 OR ID = 1966 OR ID = 1968 OR ID = 1736 OR ID = 1967 OR ID = 2036 OR ID = 1737 OR ID = 1965 OR ID = 1963 OR ID = 2034 OR ID = 1964 OR ID = 2150 OR ID = 2199 OR ID = 1983 OR ID = 1975 OR ID = 1976 OR ID = 2045 OR ID = 2046 OR ID = 1978 OR ID = 1977 OR ID = 2022 OR ID = 2035 OR ID = 2018 OR ID = 2118 OR ID = 2119 OR ID = 1979 OR ID = 1980 OR ID = 1982 OR ID = 1981 OR ID = 2019 OR ID = 1939 OR ID = 2064 OR ID = 2020 OR ID = 1764 OR ID = 2015 OR ID = 1905 OR ID = 1940 OR ID = 1458 OR ID = 1481 OR ID = 1478 OR ID = 1480 OR ID = 1459 OR ID = 1483 OR ID = 1457 OR ID = 1472 OR ID = 1454 OR ID = 1445 OR ID = 1443 OR ID = 1428 OR ) AND ((showCatIDs like '%|119|%' OR catID='119') AND (showCatIDs like '%|115|%' OR catID='115') AND (showCatIDs like '%|145|%' OR catID='145') AND ) ID!=0 ) order by urun.seq desc limit 0,999