select `schedule`.`id` as `scheduleid`,`longtour`,`datetime`,`schedule`.`tour` as `tour`,`tourdata`.`tour` as `tourname` from `schedule`,`tourdata` where `schedule`.`tour`=`tourdata`.`id` and `tourdata`.`forsale`=1 and `schedule`.`tour`!='202510' and `schedule`.`tour` < '202509' and `schedule`.`datetime` like '2025-12-07%' and `schedule`.`datetime` < '2025-12-07 17:39:00' and `schedule`.`tour`!=Array and `schedule`.`tour`!=Array and `schedule`.`tour`!=Array and `schedule`.`tour`!=Array and `schedule`.`tour`!=Array and `schedule`.`tour`!=Array order by `schedule`.`datetime` desc