SELECT
                      	T.id , T.id_same,T.tour_name,T.tour_name_en,T.tour_type_id,
                        T.tour_code,T.start_date,T.end_date,T.night,T.`day`,T.tour_pic,
                        T.origin_continent_id,T.origin_country_id,T.is_show,T.is_special,T.is_del,
                        T.`language`,
                        T.origin_city_name,
                        ReservationOriginCity.name_en AS origin_city_name_en,
                        T.origin_city_id,
                        T.origin_region_name,
                        T.origin_country_name,
                        ReservationOriginCountry.name_en AS origin_country_name_en,
                        TR.destination_country_name,
                        ReservationDestinationCountry.name_en AS destination_country_name_en,
                        TR.destination_city_name,
                        ReservationDestinationCity.name_en AS destination_city_name_en,
                        TR.destination_region_name,
                        TR.airline_name,
                        TR.type_vehicle_name,
                        TR.exit_hours,
                        TR.airline_id,
                        TR.type_vehicle_id,
                        TR.tour_title,
                        TR.destination_country_id,
                        TR.id AS idRout
                  FROM
                      reservation_tour_tb AS T
                      INNER JOIN reservation_tour_rout_tb AS TR ON T.id=TR.fk_tour_id
                      LEFT JOIN reservation_city_tb AS ReservationOriginCity ON ReservationOriginCity.id=T.origin_city_id
                      LEFT JOIN reservation_country_tb AS ReservationOriginCountry ON ReservationOriginCountry.id=T.origin_country_id
                      LEFT JOIN reservation_city_tb AS ReservationDestinationCity ON ReservationDestinationCity.id=TR.destination_city_id
                      LEFT JOIN reservation_country_tb AS ReservationDestinationCountry ON ReservationDestinationCountry.id=TR.destination_country_id
                       INNER JOIN reservation_tour_tourType_tb AS TTT ON T.id_same=TTT.fk_tour_id_same
                  WHERE
                      T.is_del = 'no'
                      AND 
                      T.is_show = 'yes' 
                      AND TR.tour_title='dept'
                       AND (T.start_date > '14020108' AND T.start_date <= '14020319')  AND T.origin_country_id = '1'  AND TR.destination_country_id = '28' 
                  GROUP BY T.tour_code
                  ORDER BY T.priority=0,T.priority ASC
                  
Close

تورهای

تغییر جستجو
مطالب مرتبط