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