You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

24 lines
855 B

  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: Qiu Song
  5. * Date: 2017/02/21
  6. * Time: 15:00
  7. */
  8. header("Content-type:text/html;charset=utf-8");
  9. require_once __DIR__.'/../Common/Mysql.php';
  10. date_default_timezone_set('Asia/Shanghai');
  11. $current_day = date("Y-m-d");
  12. $pdo_update=conn();
  13. $sql_update = " UPDATE run_bus SET run_bus_status=141 WHERE run_id IN (SELECT run_id FROM run_main WHERE run_date < '{$current_day}' AND run_status IN (138,139,141)) AND run_bus_status IN(138,139) ";
  14. $pdo_update->exec($sql_update);
  15. $sql_update2 = " UPDATE run_main SET run_status=141 WHERE run_date < '{$current_day}' AND run_status IN (138,139)";
  16. $pdo_update->exec($sql_update2);
  17. $sql_update3 = " UPDATE outside_run SET remain_count=0 WHERE update_time <= '{$current_day} 00:00:00' AND remain_count > 0 ";
  18. $pdo_update->exec($sql_update3);
  19. echo $current_day." END";
  20. exit();