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-10-17' 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 = '111' and p.products_id not in (34678,38793,39122,22393,21538,40781,42540,39524,44314,40782,40774,40780,39213,25724,22455,22447) group by p2m.manufacturers_id

[TEP STOP]