Unknown column 'inf' in 'where clause' (1054). Query: SELECT rab.*, CEIL(rab.nprice * cur.USDCUR) as USDPRICE, coalesce(ml.langEN,ml.langUKR,ml.langRU,ml.langISP,ml.langROM,ml.langFR,ml.langDE,ml.langPRT,ml.langPOL, m.smodel) AS model_name, m.nproducer, coalesce(country.scountry_EN,country.scountry_UKR,country.scountry_RU,country.scountry_ISP,country.scountry_ROM,country.scountry_FR,country.scountry_DE,country.scountry_PRT,country.scountry_POL) AS country_name, country.flag_icon, coalesce(state.sstatEN,state.sstatUKR,state.sstatRU,state.sstatISP,state.sstatROM,state.sstatFR,state.sstatDE,state.sstatPRT,state.sstatPOL) AS advert_state, usr.nickname, case CONVERT(usr.confirmationcode, UNSIGNED INTEGER)*10 + usr.isdummy when '10' then 11 when '20' then 11 when '30' then 13 when '11' then 1 when '21' then 1 when '31' then 3 else 10 end as confirmationcode_int, rab.confcodeint, usr.isdummy, IF (usr.nactivities='5' AND rab.nstate='1' AND NOT ISNULL(usrComp.company) /*AND prodComp.producer=m.nproducer*/ AND EXISTS (SELECT id FROM r_producer_company WHERE r_producer_company.producer = m.nproducer AND r_producer_company.company=usrComp.company), 1,0) as oficial_order, usr.confirmationcode , usr.nactivities, usr.nsubactivities, -1 as user_role, cur.USDCUR, m.nkeywords, m.scaption, m.smodel, m.skeywords, prod.sname as producer_name, rat_cache.points AS POINTS, stat.visits, rat_cache.avg_rating as AVG_RATING , 1 as rev, rab.id as advert_id , DATE_FORMAT(rab.ddate, '%d.%m.%Y') as normal_date, DATE_FORMAT(rab.ins_date, '%d.%m.%Y') as normal_ins_date /*, 0 as oficial_order */, usr.approved, m.nkategory as model_category_id ,rab.first_moder_date + rab.last_moder_date as moderversion FROM r_ad_buy as rab INNER JOIN r_model as m ON rab.nmodel=m.id LEFT JOIN r_lang as descr ON rab.lng_desc=descr.id /* LEFT JOIN r_lang_speed_memory as ml ON m.nmodel=ml.lang_id */ LEFT JOIN r_lang as ml ON m.nmodel=ml.id LEFT JOIN r_ad_buy_stat as state on rab.nstate = state.id LEFT JOIN r_ad_buy_cur as cur ON rab.npricecur = cur.id LEFT JOIN r_countries as country ON country.id=rab.ncountry LEFT JOIN r_users as usr ON rab.nuser=usr.id LEFT JOIN r_rating_cache as rat_cache ON rab.nuser=rat_cache.user_id LEFT JOIN r_stat_advertviews_common_main as stat ON stat.advert_id=rab.id LEFT JOIN r_producers as prod ON m.nproducer=prod.id LEFT JOIN r_user_company as usrComp ON usrComp.`user`=rab.nuser /*LEFT JOIN r_producer_company as prodComp ON prodComp.company=usrComp.company AND prodComp.moderated=1*/ WHERE rab.nmodel NOT IN (17101) AND /*1*/ rab.nmoderated=1 AND /*1*/ rab.narch=0 AND /*1*/ rab.nbuy=0 AND /*1*/ ( (rab.nyear1 >=2014 AND rab.nyear1 <=2016) OR rab.nyear1<=0 ) AND /*1*/ (rab.nhideprice = 1 or ( rab.nprice >= 5625 and rab.nprice <= 9375 and rab.npricecur = 1 ) or ( rab.nprice >= 5277 and rab.nprice <= 8795 and rab.npricecur = 2 ) or ( rab.nprice >= 351563 and rab.nprice <= 585938 and rab.npricecur = 3 ) or ( rab.nprice >= inf and rab.nprice <= inf and rab.npricecur = 4 ) or ( rab.nprice >= 4419 and rab.nprice <= 7365 and rab.npricecur = 45 ) or ( rab.nprice=0 AND usr.nactivities=5 AND rab.nstate=1 AND NOT ISNULL(usrComp.company) AND EXISTS (SELECT id FROM r_producer_company WHERE company=usrComp.company AND producer=m.nproducer AND moderated=1)) ) AND /*1*/ rab.cid IN (680,680 ) AND /*1*/ ( ( EXISTS (SELECT id FROM r_advert_areas WHERE advert_id=rab.id LIMIT 1) AND EXISTS (SELECT id FROM r_advert_areas WHERE advert_id=rab.id AND country_id IN (224,-1) LIMIT 1) ) OR NOT EXISTS (SELECT id FROM r_advert_areas WHERE advert_id=rab.id LIMIT 1) ) AND /*1*/ m.nproducer IN(346) AND /*1*/ rab.nuser NOT IN(27) AND /*1*/ usr.is_dummy_official=0 ORDER BY rab.confcodeint DESC,model_name ASC LIMIT 0,10