我正在尝试使用多个if语句
打印所需的数据$event_date = '2015-11-16';
//print_r($event_date);
$daily_info = array();
$buk_data = array();
$bw_daily_data = db_query('select * from potli_booking where buk_date =:buk_date order by refno',array(':buk_date' => $event_date));
foreach($bw_daily_data as $daily_data) {
$waitlist = $daily_data->waitlist;
$noshow = $daily_data->noshow;
$seated = $daily_data->seated;
if($waitlist == '0' && $noshow == 'no' && $seated == 'NULL') {
$daily_info['data'][]=array(
'firstname' =>$daily_data->fname,
'lastname' => $daily_data->lname,
'time'=>$daily_data->time,
'status'=>'overdue arrival'
);
}
else if($waitlist == '1' && $noshow == 'no' && $seated == 'NULL') {
$daily_info['data'][]=array(
'firstname' =>$daily_data->fname,
'lastname' => $daily_data->lname,
'time'=>daily_data->time,
'status'=>'Wait list'
);
}
else if ($waitlist == '0' && $noshow == 'yes' && $seated == 'NULL') {
$daily_info['data'][]=array(
'firstname' =>$daily_data->fname,
'lastname' => $daily_data->lname,
'time'=>daily_data->time,
'status'=>'No show'
);
}
else {
$daily_info['data'][]=array(
'firstname' =>$daily_data->fname,
'lastname' => $daily_data->lname,
'time'=>daily_data->time,
'status'=>'seated'
);
}
}
print_r($daily_info);
但它只打印就座数据。帮我解决这个问题