我使用Gii工具为名为vast_table
的表生成了搜索模型。
但是我在Gii生成的模型中有一个语法错误,这是完全正常的。
错误是:
PHP Parse Error – yii\base\ErrorException
syntax error, unexpected ']'
我的搜索模型如下所示:
$query->andFilterWhere(['like', 'Ad', $this->Ad])
->andFilterWhere(['like', 'Collapse', $this->Collapse])
->andFilterWhere(['like', 'CloseLinear', $this->CloseLinear])
->andFilterWhere(['like', 'Skip', $this->Skip])
->andFilterWhere(['like', 'Played10%', $this->Played10%])
->andFilterWhere(['like', 'Played30%', $this->Played30%])
->andFilterWhere(['like', 'Played40%', $this->Played40%])
->andFilterWhere(['like', 'Played60%', $this->Played60%]);
错误指向最后四行。我该怎么办请帮助。