SELECT V.* FROM t_products AS P LEFT JOIN t_products_manufac AS V ON = P.vyrobce WHERE P.kategorie IN (,4,8,1,5,2,6) AND P.publikovano = 1 GROUP BY 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 '4,8,1,5,2,6) AND P.publikovano' at line 6