升级php版本后错误修复
This commit is contained in:
@@ -69,15 +69,17 @@ class PrescripDetailController extends BaseAppController
|
||||
$query->andWhere(['p.prescription_type'=>$post['prescription_type']]);
|
||||
}
|
||||
|
||||
if($post['start_time']?? false&&!$post['end_time']?? false){
|
||||
$post['start_time'] = $post['start_time']?? false;
|
||||
$post['end_time'] = $post['end_time']?? false;
|
||||
if($post['start_time']&&!$post['end_time']){
|
||||
$query->andWhere(['>=','p.created_at',strtotime($post['start_time'])]);
|
||||
}
|
||||
|
||||
if(!$post['start_time']?? false&&$post['end_time']?? false){
|
||||
if(!$post['start_time']&&$post['end_time']){
|
||||
$query->andWhere(['<=','p.created_at',strtotime($post['end_time'])]);
|
||||
}
|
||||
|
||||
if($post['start_time']?? false&&$post['end_time']?? false){
|
||||
if($post['start_time']&&$post['end_time']){
|
||||
$query->andWhere(['between','p.created_at',strtotime($post['start_time']),strtotime($post['end_time'])]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user