select distinct p.products_id, pd.products_name, pd.products_description, p.products_kod_oryginal, p.products_price, p.products_price_2, p.kaucja,
p.products_tax_class_id, gf.thumb, gf.images, m.manufacturers_name from products p, products_description pd, typ_to_products t2p, typ t,
products_to_categories_new p2c, stany_products sp, manufacturers m, grupy_foto_new gf
where p.products_id = pd.products_id and p.products_id = sp.products_id and t2p.products_id = p.products_id and p.products_id = p2c.products_id
and t2p.typ_id = t.id_typu and p.products_id = gf.products_id and t.id_marki = 74 and t.id_modelu = 4889 and ( p2c.categories_id = 100280 or p2c.categories_id = 100426 or p2c.categories_id = 100445 or p2c.categories_id = 100448 or p2c.categories_id = 102671 or p2c.categories_id = 100276 or p2c.categories_id = 100443 or p2c.categories_id = 100439 or p2c.categories_id = 100442 or p2c.categories_id = 100277 or p2c.categories_id = 100440 or p2c.categories_id = 100444 or p2c.categories_id = 100447 or p2c.categories_id = 100869 or p2c.categories_id = 100281 or p2c.categories_id = 100446 or p2c.categories_id = 100437 or p2c.categories_id = 100449)
and sp.dostepny = 1 and p.manufacturers_id = m.manufacturers_id and pd.language_id = '19' and gf.Sort = 1 limit 6