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 = '122' and p.products_id not in (38760,34666,43647,20049,42742,43645,43945,39149,43646,40469,40470,40468,43644,43643,43642,43946) group by p2m.manufacturers_id

[TEP STOP]