P
P
Petr Fronin2016-03-10 16:43:00
Yii
Petr Fronin, 2016-03-10 16:43:00

How to set 2 updateAll search parameters in Yii2?

Tell me how to set 2 search parameters for updateAll, example:

updateAll(
    ['name' => 'Вася', 'last_name' => 'Петров'],
    ['id' => 1, 'city' => 'Moskow']
);

so everything works, but how to set that city != Moskow

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kirill Arutyunov, 2016-03-10
@amar_std

[
'and',
['id' => 1],
['<>', 'city', 'Moskow']
]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question