Get CGridView to return selected values
Pergunta
I would like to return selected values to the CGridView (similar to IN query) using the search function that is generated by Yii.To elaborate further let me use the example below:
Here I return values of the based on the value '34455' (fk_recordid)
public function search()
{
$fk_recordid = '34455';
$criteria=new CDbCriteria;
$criteria->compare('id',$this->id,true);
$criteria->compare('fk_recordid',$fk_recordid,true);
$criteria->compare('babypid',$this->babypid);
$criteria->compare('babysbn',$this->babysbn);
return new CActiveDataProvider(get_class($this), array(
'criteria'=>$criteria,
));
}
How would I change this code to widen the fk_recordid criteria i.e return records based on several values such as '34455','47859','78956' .....
Nenhuma solução correta
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow