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(9243,9271,9306,9336,9364,9368,9372,9378,9406,9416,9456,9503,9512,9521,9569,9577,9584,9597,9602,9603,9606,9609,25909,25910,33212,33242,33250,33286,33937,33938,33999,34046,34081,36966,54009,54297,54299,54301,54889,54962,55001,55028,55029,55069,55090,55125,55192,55193,55326,55368,55965,58291,67009,67137,67145,67149,67150,67153,67159,67160,67161,67162,67163,67164,67165,67166,67167,67168,69052,69095,69166,69198,69767,69996,71825,71956,80360,84392,94920,95962,98475,98658,99344,99381,99465,99574,99632,99708,99800,100338,100526,100907,101512,102023,102063,102125,102271,102604,102708,102710,102730,102734,103069,103704,104495,105210,105315,105673,106330,106763,109911,110088,110292,112287,112370,112782,113146,113383) and (pr.validfrom is null or (validfrom>='2021-04-23')) and (pr.expires is null or (expires>='2021-04-23')) and pr.hotelduration=10 and pr.tourduration=10 and pr.departuredate='2020-07-22' 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='260' and idx.cityid='294' ;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 ;
POPUST 10€
ONLINE REZERVACIJA 24/7 DOSTUPNO
Zbog velikog interesovanja
naš call centar je često zauzet.
Jednostavno napravite rezervaciju.