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.
 
 
 
 

27 lines
721 B

  1. <?php
  2. require_once '../st-xm/Common/Mysql.php';
  3. header("Access-Control-Allow-Origin:*");
  4. $current_day = date("Y-m-d");
  5. $pdo=conn1();
  6. $sql = "SELECT * FROM run_main WHERE RUN_DATE >= '{$current_day}' ";
  7. $result = $pdo->query($sql);
  8. $rowset = $result->fetchAll(PDO::FETCH_ASSOC);
  9. $result->closeCursor();
  10. $run_array = array();
  11. foreach( $rowset as $row_info ) {
  12. $run_id = $row_info["RUN_ID"];
  13. $sql_txt = " SELECT count(*) as err_num FROM run_{$run_id} WHERE SEAT_STATUS=1 ";
  14. $result = $pdo->query($sql_txt);
  15. $rowset_result = $result->fetchAll(PDO::FETCH_ASSOC);
  16. $result->closeCursor();
  17. if( $rowset_result[0]["err_num"] > 0 ) {
  18. echo "RUN_".$run_id."<hr />";
  19. }
  20. }
  21. echo "success";
  22. exit();