/* lapozoajanlat_60_468899 */ SELECT 1 AS deforderfield, t.ajanlat_id, t.prior, t.ajanlat_cim, t.ajanlat_szallasnev, t.hajo_id, t.hajotarsasag_id, t.tui_kategoria, t.tui_marka, t.ajanlat_leiras, t.ajanlat_lastupdate, t.orszag_id, t.regio_id, t.siregio_id, t.varos_id, t.iroda_id, t.utazasmod_id, t.prtipus_id, t.ellatas_id, t.idopontid, t.galeria_id, t.ajanlat_alcim, t.ellatas_nev, t.szallaskat_nev, t.utazasmod_nev,a.regi_ar,a.akcio_szazalek, a.ardecimal, a.arak_osszesitett, a.eurosar, a.megjegyzes, IF (a.eurosar = 1, ROUND(IF ((SELECT euroarfolyam FROM irodak WHERE iroda_id = t.iroda_id) > 0, (SELECT euroarfolyam FROM irodak WHERE iroda_id = t.iroda_id), 310.00) * a.ardecimal), a.ardecimal) AS euro_forint_iroda, ido.idopont_id, IF(ido.idopont_szezonalis = 1 AND ido.idopont_datum1 <= '2020-06-01', '2020-06-01', ido.idopont_datum1) AS idopont_datum1, ido.idopont_datum2, ido.idopont_ellatas, ido.idopont_idotartam, ido.idopont_idotartam_nap, ido.idopont_szezonalis, ido.idopont_elofoglalas, ido.idopont_akcios, ido.idopont_tipus FROM (SELECT a.ajanlat_id, a.prior, a.ajanlat_cim, a.ajanlat_szallasnev, h.hajo_id, h.hajotarsasag_id, a.tui_kategoria, a.tui_marka, a.ajanlat_leiras, a.ajanlat_lastupdate, b.orszag_id, b.regio_id, b.siregio_id, b.varos_id, b.iroda_id, b.utazasmod_id, b.prtipus_id, b.ellatas_id, a.ajanlat_alcim, (SELECT x.idopont_id FROM idopont x, arak y WHERE x.idopont_status = 1 AND ( (x.idopont_szezonalis = 1 AND x.idopont_datum2 <= '2020-12-01' AND x.idopont_datum2 >= '2020-06-01') OR (x.idopont_szezonalis = 0 AND x.idopont_datum1 >= '2020-06-01' AND x.idopont_datum1 <= '2020-12-01') ) AND ( (x.idopont_arlejar > '0000-00-00' AND x.idopont_arlejar >= '2020-06-01') OR (x.idopont_arlejar = '0000-00-00') ) AND x.ajanlat_id = a.ajanlat_id AND x.idopont_id = y.idopont_id GROUP BY x.idopont_id ORDER BY x.idopont_datum1 ASC, y.ardecimal ASC LIMIT 0, 1 ) AS idopontid, a.galeria_id, l.ellatas_nev, m.szallaskat_nev, n.utazasmod_nev FROM ajanlat a LEFT JOIN ajanlat_korutazas ku ON (a.ajanlat_id = ku.ajanlat_id), arajanlat b LEFT JOIN hajo h ON (b.hajo_id = h.hajo_id), irodak o, ellatas l, szallaskat m, utazasmod n WHERE a.ajanlat_id = b.ajanlat_id AND b.iroda_id = o.iroda_id AND b.ellatas_id = l.ellatas_id AND b.szallaskat_id = m.szallaskat_id AND b.utazasmod_id = n.utazasmod_id AND a.ajanlat_status = 1 AND (a.ajanlat_megosztas = 1 OR b.iroda_id = 60) AND a.ajanlat_id = '469299' GROUP BY a.ajanlat_id ) as t LEFT JOIN arak as a ON (a.idopont_id = t.idopontid) LEFT JOIN idopont as ido ON (ido.idopont_id = t.idopontid) WHERE a.ardecimal IS NOT NULL ORDER BY t.orszag_nev ASC / Unknown column 't.orszag_nev' in 'order clause'