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 (1187,1188,1189,1190,1209,1211,1207,1208,1210,1219,1191,1220,1212,1199,1202,1203,1201,1200,1192,1195,1198,1193,1196,1194,1216,1218,1217) AND
p.products_status = '1' and p.listing_status = '0' and ( (p.customers_group_id = '0' or p.customers_group_id = '' ) )
ORDER BY p.products_date_added desc, pd.products_name LIMIT 0,24