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 '%|127|%' OR catID='127') AND (showCatIDs like '%|143|%'' at line 1select * from urun where urun.bakiyeOdeme=0 AND urun.active = 1 AND urun.active = 1 AND ((ID = 2081 OR ID = 1553 OR ID = 1642 OR ID = 1598 OR ID = 1597 OR ID = 2193 OR ID = 2204 OR ID = 2194 OR ID = 2198 OR ID = 1653 OR ID = 1652 OR ID = 1655 OR ID = 2082 OR ID = 2083 OR ID = 2084 OR ID = 2085 OR ID = 2086 OR ID = 1628 OR ID = 1625 OR ID = 1654 OR ID = 1651 OR ID = 1610 OR ID = 1603 OR ID = 1599 OR ID = 1634 OR ID = 1627 OR ID = 1632 OR ID = 1637 OR ID = 1639 OR ID = 1631 OR ID = 1633 OR ID = 1638 OR ID = 2196 OR ID = 1630 OR ID = 1636 OR ID = 1629 OR ID = 1643 OR ID = 1644 OR ID = 1640 OR ID = 1641 OR ID = 1626 OR ID = 2202 OR ID = 1600 OR ID = 1614 OR ID = 1729 OR ID = 1604 OR ID = 1772 OR ID = 1770 OR ID = 1635 OR ID = 1645 OR ID = 2203 OR ID = 1616 OR ID = 1613 OR ID = 1771 OR ID = 1728 OR ID = 2208 OR ID = 2205 OR ID = 2206 OR ID = 1727 OR ID = 1608 OR ID = 1615 OR ID = 2201 OR ID = 1602 OR ID = 1612 OR ID = 1607 OR ID = 2195 OR ID = 1623 OR ID = 1730 OR ID = 1609 OR ID = 1624 OR ID = 1601 OR ID = 1611 OR ID = 1606 OR ID = 1605 OR ID = 1554 OR ID = 1550 OR ID = 1595 OR ID = 1596 OR ID = 1488 OR ID = 1492 OR ID = 1493 OR ID = 1491 OR ID = 1489 OR ID = 1460 OR ID = 1549 OR ID = 1490 OR ) AND ((showCatIDs like '%|127|%' OR catID='127') AND (showCatIDs like '%|143|%' OR catID='143') AND ) ID!=0 ) order by urun.seq desc limit 0,999