1054 - Unknown column 's.status' in 'where clause'

select p2m.manufacturers_id, m.manufacturers_name from products p inner join products_to_categories p2c on p.products_id = p2c.products_id inner join products_to_manufacturers p2m on p.products_id = p2m.products_id inner join manufacturers m on m.manufacturers_id = p2m.manufacturers_id where p.products_status = '1' and (LEFT(p.products_date_available, 10) <= '2017-11-21' OR p.products_date_available IS NULL) and IF(s.status, s.specials_new_products_price >='10', p.products_price >='10') and IF(s.status, s.specials_new_products_price <='20', p.products_price <='20') and p2c.categories_id = '122' and p.products_id not in (43647,43645,43642,34666,43945,38760,43646,43643,45248,45245,40469,40470,40468,43644,43946,43681) group by p2m.manufacturers_id

[TEP STOP]