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 = '2'
WHERE ptc.categories_id in (1061,1062,1063,1064,1066,1065,1067,1068,1069,1079,1080,1081,1082,1083,1084,1085,1071,1072,1073,1074,1075,1076,1077,1078,1086,1087,1088,1089,1090,1091,1092) 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