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,232,233,245,246,247,248,268,143,224,145,146,148,227,228,234,150,216,220,221,222,223,151,229,230,231,253,195,147,81,217,252,182,181,199,202,204,214,254,1,2,218,219,242,243,244,4,238,239,240,249,265,5,6,7,8,10,269,16,17,18,19,20,21,22,23,24,25,26,28,29,30,31,32,33,34,35,36,37,39,40,41,42,43,48,49,51,52,53,55,56,57,54,132,133,134,135,256,96,235,98,237,106,236,101,100,102,263,264,105,107,44,47,46,58,59,67,68,69,72,73,65,164,166,167,168,169,267,176,178,179,197,207,165,212,208,209,155,196,91,156,158,157,159,162,255,257,258,259,260,262,266) AND P.publikovano = 1 GROUP BY V.id You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '180,188,241,190,191,205,225,226,232,233,245,246,247,248,268,143,224,145,146,148,' at line 6