PHP学院的中学生 2022-05-07 19:07:12 747次浏览 0条回复 0 0 0
$key = ['name','age','add_time'];
$value = [
    '0' => ['zhang','18','2019-05-10 20:20:20'];
    '1' => ['zhang','18','2019-05-10 20:20:20'];
    '2' => ['zhang','18','2019-05-10 20:20:20'];
    '3' => ['zhang','18','2019-05-10 20:20:20'];
];
 
$addAll = \Yii::$app->db->createCommand()->batchInsert('数据表名', $key, $value)->execute();
    没有找到数据。
您需要登录后才可以回复。登录 | 立即注册