Hi friends,
If I want to support use ajax search function in display, I’ll use like actionAdmin():
$model=new LichChay('search');
$model->unsetAttributes(); // clear any default values
if(isset($_GET['LichChay']))
$model->attributes=$_GET['LichChay'];
$this->render('admin',array(
'model'=>$model,
));
In above code, we use scenario of CActiveRecord is "search" to call function search in model. In model, the search function using criteria to compare each properties.
If my view have a dropdownbox, and user wanna filter data by dropdown and then they also can search. Can I add more than one scenario during call my model (Lichchay) instant of "search"
Thanks