Ошибка DB:

Unknown column '2≠w' in 'having clause'

SELECT SQL_CALC_FOUND_ROWS rp.*, ri.path as image_path, rm.metro, rc.name category_name, c.city_name_ru, m.name material_name FROM real_prodaja rp LEFT JOIN real_metro rm ON rm.iditem = rp.id LEFT JOIN real_image ri ON (ri.idrealty = rp.id) AND (ri.first = 1) LEFT JOIN real_cat rc ON rc.id = rp.tip LEFT JOIN cities c ON rp.city = c.id_city LEFT JOIN real_material m ON rp.material = m.id GROUP BY rp.id HAVING rp.region = 1 AND (rp.tip = 2≠w=1) LIMIT 10 OFFSET 0