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-09-26' 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 = '218' and p.products_id not in (40793,39153,35598,39151,38638,40890,38625,21743,44733,44732,40539,41905,40787,43699,43698,43700) group by p2m.manufacturers_id

[TEP STOP]