S
S
SwoDs2016-07-05 18:35:36
Yii
SwoDs, 2016-07-05 18:35:36

How to updateAll yii2 if the table has a composite key?

Hi, in fact, you need to update the table with a composite key
, here is a common example where 1 key

SpLicenseUl::updateAll(['active' => 0], ['in', 'id', $license]);

here in the license there is an array of keys [1,5,6,7]
but what about when the key is composite - [123-12, 124-35, 646-12]

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Michael, 2016-07-05
@springimport

There is no such thing as multiple primary keys.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question