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) <= '2018-02-23' 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 (43643,43646,43645,43644,43647,43642,43946,38760,45488,45248,45245,40469,40470,40468,43945,43682) group by p2m.manufacturers_id

[TEP STOP]