select
p.products_id,
pd.products_name,
p.products_image,
p.products_price,
p.products_tax_class_id,
IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price,
p.products_date_added,
m.manufacturers_name as manufacturers_name,
c.*,
pp.*
from
products p
LEFT JOIN
products_parameters pp
on pp.pp_id_to_products = p.products_id,
categories c,
products_to_categories p2c
left join
manufacturers m
on
c.city = m.manufacturers_id
left join
products_description pd
on
p.products_id = pd.products_id
and
pd.language_id = '3'
left join
specials s
on
p.products_id = s.products_id
where
c.categories_status=1
and
p.products_id = p2c.products_id
and
c.categories_id = p2c.categories_id
and
products_status = '1'
and bdsm=1
order by
p.products_date_added DESC,
pd.products_name
limit 3