24/7 Support number 1-555-555-555

WordPress-Datenbank-Fehler: [The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay]
SELECT IFNULL(MIN(the_date), 0) min_date FROM ( SELECT DISTINCT (avc.number_of_available_places - IFNULL(bc.number_of_booked_places, 0)) available_places, avc.the_date, avc.price FROM ( SELECT SUM(max_people) number_of_available_places, possible_dates.the_date, price FROM 0_byt_tour_schedule availabilities INNER JOIN ( select d.the_date from ( select adddate('2019-10-24',t4.i*10000 + t3.i*1000 + t2.i*100 + t1.i*10 + t0.i) the_date from (select 0 i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) t0, (select 0 i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) t1, (select 0 i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) t2, (select 0 i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) t3, (select 0 i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) t4 having the_date between '2019-10-24' and '2023-12-24' ORDER BY the_date ) d where DATE(d.the_date) > DATE(CURDATE()) group by d.the_date order by d.the_date ) possible_dates ON possible_dates.the_date = DATE(availabilities.start_date) AND availabilities.end_date IS NULL WHERE availabilities.tour_id = 1557 GROUP BY possible_dates.the_date, availabilities.price ) as avc LEFT JOIN ( SELECT SUM(bookings.adults + bookings.children) number_of_booked_places, possible_dates.the_date booking_date FROM 0_byt_tour_booking bookings INNER JOIN ( select d.the_date from ( select adddate('2019-10-24',t4.i*10000 + t3.i*1000 + t2.i*100 + t1.i*10 + t0.i) the_date from (select 0 i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) t0, (select 0 i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) t1, (select 0 i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) t2, (select 0 i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) t3, (select 0 i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) t4 having the_date between '2019-10-24' and '2023-12-24' ORDER BY the_date ) d where DATE(d.the_date) > DATE(CURDATE()) group by d.the_date order by d.the_date ) possible_dates ON possible_dates.the_date = DATE(bookings.tour_date) WHERE bookings.tour_id = 1557 GROUP BY possible_dates.the_date ) as bc ON bc.booking_date = avc.the_date HAVING available_places > 0 ) as pr

WordPress-Datenbank-Fehler: [The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay]
SELECT IFNULL(MIN(price), 0) min_price FROM ( SELECT DISTINCT (avc.number_of_available_places - IFNULL(bc.number_of_booked_places, 0)) available_places, avc.the_date, avc.price FROM ( SELECT SUM(max_people) number_of_available_places, possible_dates.the_date, price FROM 0_byt_tour_schedule availabilities INNER JOIN ( select d.the_date from ( select adddate('2019-10-24',t4.i*10000 + t3.i*1000 + t2.i*100 + t1.i*10 + t0.i) the_date from (select 0 i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) t0, (select 0 i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) t1, (select 0 i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) t2, (select 0 i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) t3, (select 0 i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) t4 having the_date between '2019-10-24' and '2020-10-24' ORDER BY the_date ) d where DATE(d.the_date) > DATE(CURDATE()) group by d.the_date order by d.the_date ) possible_dates ON possible_dates.the_date = DATE(availabilities.start_date) AND availabilities.end_date IS NULL WHERE availabilities.tour_id = 1557 GROUP BY possible_dates.the_date, availabilities.price ) as avc LEFT JOIN ( SELECT SUM(bookings.adults + bookings.children) number_of_booked_places, possible_dates.the_date booking_date FROM 0_byt_tour_booking bookings INNER JOIN ( select d.the_date from ( select adddate('2019-10-24',t4.i*10000 + t3.i*1000 + t2.i*100 + t1.i*10 + t0.i) the_date from (select 0 i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) t0, (select 0 i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) t1, (select 0 i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) t2, (select 0 i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) t3, (select 0 i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) t4 having the_date between '2019-10-24' and '2020-10-24' ORDER BY the_date ) d where DATE(d.the_date) > DATE(CURDATE()) group by d.the_date order by d.the_date ) possible_dates ON possible_dates.the_date = DATE(bookings.tour_date) WHERE bookings.tour_id = 1557 GROUP BY possible_dates.the_date ) as bc ON bc.booking_date = avc.the_date HAVING available_places > 0 ) as pr