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,2,5,207,45,18,33,193,22,195,196,47,206,17,191,213,31,152,32,16,203,204,50,51,192,49,151,210,211,3,34,70,71,212,35,158,159,28,171,172,173,174,27,167,168,169,36,161,162,37,38,39,164,165,170,178,40,181,188,198,201,200,202,199,182,186,187) 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,2,5,207,45,18,33,193,22,195,196,47,206,17,191,213,31,152,' at line 6