SELECT * FROM `workbasicinfo` WHERE worktitle like '%11%' and worktag like '%22%'and (worktitle like '%33%' or worktag like '%33%')
我现在写的是这样的:
$query = Worksinfo::find()
->andFilterWhere(['like', 'workid', $this->workid])
->andFilterWhere(['like', 'makerid', $this->makerid])
->andFilterWhere(['like', 'worktitle', $this->worktitle])
->andFilterWhere(['like', 'worktag', $this->worktag])
->andFilterWhere(['like', 'makername', $this->makername])
->asArray();