亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

php - Yii2 uses a sql statement to batch update instead of looping inserts. How to achieve this?
漂亮男人
漂亮男人 2017-05-17 09:55:39
0
1
973

Yii implements the following batch insertion method. If it is batch update, is there the same implementation method in Yii2?


Yii::$app->db
    ->createCommand()
    ->batchInsert($table, $columns, $rows)
    ->execute();

Batch update is a method of using a SQL statement to implement batch updates instead of cyclic updates, e.g:

UPDATE order
    SET field = CASE order_no
        WHEN 1 THEN 'value'
        WHEN 2 THEN 'value'
        WHEN 3 THEN 'value'
    END
WHERE order_no IN (1,2,3)
漂亮男人
漂亮男人

reply all(1)
Ty80

replace into

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template