SELECT DISTINCT p.products_id, p.products_price_tax, pd.products_name, cu.value, cu.currencies_marza, (p.products_price_tax/cu.value)+(cu.value*cu.currencies_marza/100) AS cena
FROM products p
LEFT JOIN currencies cu ON cu.currencies_id = p.products_currencies_id
LEFT JOIN products_to_categories ptc ON ptc.products_id = p.products_id
LEFT JOIN products_description pd ON pd.products_id = p.products_id AND pd.language_id = '1'
WHERE ptc.categories_id in (17,85,305,303,307,304,310,308,309,315,313,314,316,89,335,334,331,81,286,283,284,285,282,94,356,358,359,360,361,86,72,187,190,193,198,1026,1027,188,654,655,656,191,189,186,184,185,197,200,194,195,196,199,192,74,213,214,216,211,212,215,217,82,291,289,290,77,237,240,243,231,241,235,242,239,244,73,202,205,208,204,207,206,209,76,226,227,230,223,224,225,229,228,80,269,270,280,1028,265,272,281,266,271,277,268,276,279,278,274,93,351,352,70,90,338,339,340,95,378,371,364,368,379,372,365,369,380,373,366,370,377,87,323,322,321,84,302,301,300,298,299,79,262,257,263,258,259,261,264,88,326,327,329,324,325,328,91,342,341,83,295,294,293,297,296,71,181,178,179,180,92,350,345,346,349,75,220,221,218,219,222,96) AND
p.products_status = '1' and p.listing_status = '0' and ( (p.customers_group_id = '0' or p.customers_group_id = '' ) )
ORDER BY p.sort_order desc, pd.products_name LIMIT 0,24
Części rowerowe - MTB - niska cena na Bikestacja.pl