Неверный запрос SELECT goods.id FROM goods LEFT JOIN categgood ON goods.id = categgood.idg LEFT JOIN vendors ON goods.idvendor = vendors.id LEFT JOIN good_types ON goods.idtype = good_types.id LEFT JOIN goods_types_links gtl ON gtl.idgood = goods.id LEFT JOIN pricematras ON goods.id = pricematras.idgood WHERE goods.invisible = 0 AND good_types.invisible = 0 AND (goods.price <> 0 OR pricematras.price <> 0) AND vendors.id <> 81 AND goods.id in () AND (goods.idtype IN (495,914,915,1111,1218,1147,1252,1423,1560,1968,2153,2154,2228,3043,3200,913,676,662,654,1970,2148,2229,3071,3113,1540,1541,1820,1821,1822,1823,1824,1825,1826,1827,1828,1829,1830,1831,1758,3205,1923,3271,3275,3276,1099,1924,1969) OR gtl.idtype IN (495,914,915,1111,1218,1147,1252,1423,1560,1968,2153,2154,2228,3043,3200,913,676,662,654,1970,2148,2229,3071,3113,1540,1541,1820,1821,1822,1823,1824,1825,1826,1827,1828,1829,1830,1831,1758,3205,1923,3271,3275,3276,1099,1924,1969)) GROUP BY goods.id
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 (goods.idtype IN (495,914,915,1111,1218,1147,1252,1423,1560,1968,2153,2154' at line 9