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 (18,99,399,397,402,396,658,659,660,401,400,403,398,118,504,101,418,419,422,417,103,432,433,435,104,440,441,443,442,437,447,446,108,465,467,473,466,471,470,469,115,123,106,455,107,464,461,462,122,662,666,111,484,485,100,405,406,414,410,407,408,409,412,411,112,488,489,113,494,495,492,490,493,114,116,496,117,501,499,98,392,390,391,102,426,427,423,120,518,510,511,512,514,516,513,509,119,507,506,508,109,475) 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