Yii search method get don't work and don't compare with data in database

这一生的挚爱 提交于 2019-12-02 08:40:06

1) In your controller you should set the scenario as "search" like this

 $model = new Datalist('search');
 $model->unSetAttributes();

2) You need to assign the $_GET values to the model before view is rendered like this

// If your get vars are different then accordingly
if(isset($_GET['AppLog'])){
     $model->attributes = $_GET['AppLog'];

....
  $model->date_to = $date_to // After you retrieved and formatted from $_GET as above 
  $model->date_from = $date_from

Your controller action does not seem to rendering a view; i am assuming that you have omitted it here, but you are displaying the output in someway

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!