批量插入记录

  1. $insertNum=\Yii::$app->db->createCommand()
  2. ->batchInsert('{{%join_relation}}',
  3. ['real_name','status','seller_muser_id','buyer_muser_id','opera_time'],$arrJoin)
  4. ->execute();
  5. if($insertNum!=count($arrJoin))
  6. {
  7. throw new Exception('网络延迟请稍后再试!4',1017);
  8. }





posted on 2015-12-24 17:07  叫我小洋  阅读(304)  评论(0编辑  收藏  举报

导航