['in', ['id', 'name'], [['id' => 1, 'name' => 'foo'], ['id' => 2, 'name' => 'bar']] ] 怎么理解
where方法的解釋(http://www.yiichina.com/doc/api/2.0/yii-db-query#where()-detail)里有個in的例子不太懂, 可以解釋下嗎?
To create a composite?IN?condition you can use and array for the column name and value, where the values are indexed by the column name:?['in', ['id', 'name'], [['id' => 1, 'name' => 'foo'], ['id' => 2, 'name' => 'bar']] ].
2016-08-18
意思是where (id=1 and name='foo') or (id=2,name='bar')
2016-08-19
這是yii框架的規(guī)則,就像人在不同的國家要守不同的法律