SELECT V.* FROM t_products AS P LEFT JOIN t_products_manufac AS V ON V.id = P.vyrobce WHERE P.kategorie IN (,180,188,241,190,191,205,225,226,233,245,246,247,248,268,273,143,224,145,146,271,148,227,234,272,150,216,220,222,223,151,229,230,231,253,270,313,81,182,181,274,1,2,218,219,242,243,4,238,239,240,312,5,6,269,289,290,291,292,293,294,295,296,297,298,299,16,24,26,31,32,36,41,278,309,96,235,98,100,102,263,264,105,310,58,155,91,158,157,162,279,311) 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 '180,188,241,190,191,205,225,226,233,245,246,247,248,268,273,143,224,145,146,271,' at line 6