select count(p.products_id) as total from ((products_description pd, products p)
left join manufacturers m on p.manufacturers_id = m.manufacturers_id, products_to_categories p2c
left join categories c on c.categories_id = p2c.categories_id) left join specials s on p.products_id = s.products_id
where c.hidden = '0' and p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and
pd.language_id = '7' and p2c.categories_id = '101' and (p.products_quantity > 0 or p.products_date_available >= (now() - interval 1 day)) and p.paypal_blocked = 0
select p.products_image, pd.products_name, p.products_id, p.manufacturers_id, p.products_price, p.products_base_price, p.products_quantity,
p.products_tax_class_id, p.products_sort_order, p.products_date_available, if(s.status, s.specials_new_products_price, null) as specials_new_products_price,
if(s.status, s.specials_new_products_price, p.products_price) as final_price from ((products_description pd, products p)
left join manufacturers m on p.manufacturers_id = m.manufacturers_id, products_to_categories p2c
left join categories c on c.categories_id = p2c.categories_id) left join specials s on p.products_id = s.products_id
where c.hidden = '0' and p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and
pd.language_id = '7' and p2c.categories_id = '101' and (p.products_quantity > 0 or p.products_date_available >= (now() - interval 1 day)) and p.paypal_blocked = 0 order by p.products_date_added desc, pd.products_name, p.products_id