2017-04-13 88 views
0

我試圖篩選yii2 gridview的一個選擇2yii2選擇2 GridView控件過濾searchmodel

在ModelSearch我

->andFilterWhere(['like', 't_persons.functions', $this->functions ]) 

不幸的是字符串(1)匹配10和11以及

enter image description here

如何過濾逗號分隔字段中的整數值?

回答

0

如果你有逗號分隔值的字符串,我會嘗試:

->andFilterWhere('t_persons.functions in ('.$this->functions.')')