Код: Выделить всё
$id = array(1,4,20);
$locations = Location::find()->where('id = :id', [':id' => $id])->all()
Код: Выделить всё
$id = array(1,4,20);
$locations = Location::find()->where('id = :id', [':id' => $id])->all()
Код: Выделить всё
$id = array(1,4,20);
$locations = Location::find()->where(['id' => $id])->all()
Код: Выделить всё
$id = [1,4,20];
$locations = Location::findAll($id);