SELECT V.* FROM t_products AS P LEFT JOIN t_products_manufac AS V ON V.id = P.vyrobce WHERE P.kategorie IN (,56,1,2,4,5,32,3,25,11,6,14,57,17,13,16,26,18,20,21,22,23,24,35,31,33,36,28,29,27,40,47,48,10,38,43,39,41,42,45,37,52,30,58,53,54,55) AND P.publikovano = 1 GROUP BY V.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 '56,1,2,4,5,32,3,25,11,6,14,57,17,13,16,26,18,20,21,22,23,24,35,31,33,36,28,29,27' at line 6