如何在PHP的while循环中使用AND运算符使用三个条件

时间:2019-04-01 11:56:59

标签: php mysql

如何在PHP的while循环中使用AND运算符使用三个条件 这是我的代码:

$query = "select * from agent_profile where status = 1";
$run = mysqli_query($con, $query);

$pricequery = "select * from airport_parking where airport_name = '$airport' AND '$parking_start_time' >= start_time ";
$resultprice = mysqli_query($con, $pricequery);

$squery = "select * from agent_services where agent_id = '$crnt_id' AND service_type = '$service_type' ";
$srun = mysqli_query($con, $squery);


if ($run && $resultprice && $squery) {
    while (($datarow = mysqli_fetch_array($run)) AND ($getdata = mysqli_fetch_array($resultprice)) AND ($sdata = mysqli_fetch_array($srun))) {
    }

1 个答案:

答案 0 :(得分:1)

尝试一下

main