public function search1()
{
// Warning: Please modify the following code to remove attributes that
// should not be searched.<br />
$criteria=new CDbCriteria;
$criteria->condition = "prod_update_id in (select MAX(prod_update_id) from product_update where product_id=:product_id)";
$criteria->params = array(":product_id" =>$this->product_id); //i think the problem is in binding the param
ProductUpdate::model()->findAll($criteria);
return new CActiveDataProvider(get_class($this), array(
'criteria'=>$criteria,
));
}
I think the problem is that the product_id is not fetched.
I fixed the error. There is nothing wrong with my search function which i mentioned before, the problem occurred because the product ids which i was enterring to search was in a multi select dropdown. I changed it to a normal dropdown and the search works fine.
But i want it to be a multi select dropdown. What changes would i have to make to my search function to make it work?