Call-centar 011 655 78 00

Pretraga aranžmana

drop temporary table if exists TP; create temporary table TP ( #PRIMARY KEY (id), #INDEX temp__prid (id), INDEX temp__marketid (wpid), INDEX temp__price (bed,ext,chd,bedpricesfinal), INDEX temp__package (packageid,packagename) ) select pr.*,P.post_title ,idx.countryid,cnt.name countryname ,idx.cityid,cty.name cityname ,idx.regionid,rgn.name regionname ,idx.servicetypeid,sta.name servicetypename ,idx.generaltypeid,gta.name generaltypename from ( select pr.* from wpone_tourpricev2final pr where pr.wpid in(9187,9188,9190,9192,9199,9205,9227,9238,9241,9247,9249,9250,9253,9259,9262,9265,9266,9286,9296,9309,9310,9320,9327,9328,9339,9340,9349,9350,9352,9369,9370,9390,9391,9392,9393,9394,9395,9396,9397,9398,9404,9412,9424,9440,9444,9445,9449,9452,9466,9468,9486,9498,9515,9522,9524,9531,9533,9535,9536,9538,9539,9540,9547,9548,9550,9551,9557,9558,9559,9560,9561,9562,9563,9571,9576,9579,9587,9592,9596,24512,24514,24515,25793,29732,40169,40170,46109,46160,50090,54200,57673,58434,60426,69369,69370,69371,77579,83770,89233,89503,90997,91622,92618,92642,93029,93319,93632,93683,93747,93748,96687,99989,102878,102879,127722,127723,127724,127876,127877,127878,128023,128024,128489,128490,128491,128492,128493,128554,128555,128556,128565,128566,128567,128819,128824,128825,128826,128827,128829,128830,128831,128832,128833,128834,128835,132636,132637,132638,132639,135673,135674,135676,135778,136677,138491,138969,140353,140359,140360,140393,141357,141370,141371,152073) and (pr.validfrom is null or (validfrom>='2022-01-25')) and (pr.expires is null or (expires>='2022-01-25')) and pr.hotelduration=5 and pr.tourduration=5 and pr.departuredate='2021-12-29' and pr.bed+pr.ext=2 and pr.inf>=0 and pr.chd=0 ) pr left join 0Wjxn7YMR_posts P on pr.wpid=P.ID left join wpone_hotelindex idx on idx.ID=pr.wpid left join 0Wjxn7YMR_terms cnt on cnt.term_id=idx.countryid left join 0Wjxn7YMR_terms cty on cty.term_id=idx.cityid left join 0Wjxn7YMR_terms rgn on rgn.term_id=idx.regionid left join 0Wjxn7YMR_terms sta on sta.term_id=idx.servicetypeid left join 0Wjxn7YMR_terms gta on gta.term_id=idx.generaltypeid where P.post_status='publish' and idx.countryid='276' and idx.cityid='277' ;drop temporary table if exists TPORDER; create temporary table TPORDER select packageid temppackageid, wpid temppostid, min(bedpricesfinal) minprice from TP where bed=2 and ext=0 and chd=0 group by packageid,wpid;select tp.* from TP tp left join TPORDER tpo on tpo.temppostid=tp.wpid and tpo.temppackageid=tp.packageid order by tpo.minprice,tp.wpid,tp.bed,tp.ext,tp.bedpricesfinal,tp.ext,tp.chd,tp.min1,tp.min2,tp.min3,tp.min4 ;