SELECT V.* FROM t_products AS P LEFT JOIN t_products_manufac AS V ON V.id = P.vyrobce WHERE P.kategorie IN (,7,66,69,65,64,63,67,68,197,2,5,207,45,18,33,220,214,193,22,195,196,47,206,225,17,191,213,222,224,16,221,203,204,50,51,151,32,152,210,211,3,34,70,71,35,158,159,28,171,172,173,174,27,167,168,36,161,162,37,38,39,164,165,170,178,223,40,181,200,202,199,182,186,187,215,216,217,218,219,227,228) AND P.publikovano = 1 GROUP BY V.id You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '7,66,69,65,64,63,67,68,197,2,5,207,45,18,33,220,214,193,22,195,196,47,206,225,17' at line 6