1,"info"=>"用户未登录")); exit; } $runid=$_GET['runid']; $startime=$_GET['startime']; $allstation=$_GET['allstation']; $allcar=$_GET['allcar']; $allticket=$_GET['allticket']; $sellday=$_GET['sellday']; $pdo=conn(); $sql="call sp_bus_run_update(".$userid.",".$runid.",'".$startime."','".$allstation."','".$allcar."','".$allticket."',".$sellday.")"; writeLog("sp_bus_run_update: ".$sql); if (is_object($pdo)){ $result=$pdo->query($sql); $rowset=$result->fetchAll(PDO::FETCH_ASSOC); $result->closeCursor(); $allcar = substr($allcar,1,-1); $allcar = explode('}{',$allcar); foreach ($allcar as $key => $vel){ $vel = explode(',',$vel); if($vel[0] != 0){ $sql = "update run_bus set cost_motorcade_id = " . $vel[4] . ",cost_type = " . $vel[5] . ",cost_price = " . $vel[6] . " where run_id = " . $runid . " and bus_order_id = " . $vel[0] . " and cancel_flag = 0"; $result=$pdo->exec($sql); } } echo json_encode($rowset[0]); }