-1,"info"=>"前四项不能全部为空")); exit; } */ $pdo=conn(); $sql="CALL XM_ORDER_GET_CAR_LIST(1,'".$startarea."','".$endarea."','".$line."','".$starttime."',".$carNo.",'".$seatNo."','".$name."',".$currpage.",".$pagesize.")"; writeLog('search_ticket---sql=='.$sql); $result=$pdo->query($sql); $data=array(); do{ $rowset=$result->fetchAll(PDO::FETCH_ASSOC); if($rowset){ $data[]=$rowset; } }while ($result->nextRowset()); $count=count($data); $final_data=array(); if($count==1 && isset($data[0][0]['code']) && $data[0][0]['code']!=0){ echo json_encode($data[0][0]); }else if($count==2){ $json=array("code"=>0,"info"=>""); $json['totalTickets']= (isset($data[1][0]['num'])) ? $data[1][0]['num'] : 0; $json['totalPages']= (isset($data[1][0]['pagecount'])) ? $data[1][0]['pagecount'] : 0; $json['searchInfo']=$data[0]; echo json_encode($json); }else{ echo json_encode(array("code"=>0,"info"=>"","searchInfo"=>array())); } exit();