永利真人赌博-2019宿松县认定教师资格证时间

首页

AD联系:507867812

永利真人赌博

时间:2019-11-16 05:46:56 作者:腾飞微电脑快速电开水器 浏览量:26241

永利真人赌博

复制代码 代码如下:$sub_form = array();$loop = 0;$ins_loop = 0;$sum = count($form_datas);$this->logger->info('insert data total:'.$sum);//使用事物批量导入有助于提高插入效率$callStartTime = microtime(true);$this->db->trans_start();foreach ( $form_datas as $item ) { $loop ++; $sub_form[] = $item; if(($loop % 200) == 0 || $loop == $sum){ $this->logger->info('insert data num:'.$loop);$res = $this->kb_object_instance_mdl->insert_batch($sub_form,$obj_id);$ins_loop ++;unset($sub_form);if(($ins_loop % 5) == 0){$this->logger->info('insert data trans_complete ins_loop:'.$ins_loop); $this->db->trans_complete(); if($loop != $sum){ $this->db->trans_start(); }} }}//$this->db->trans_complete();$callEndTime = microtime(true);$callTime = $callEndTime - $callStartTime;$this->logger->info('insert data use time:'.sprintf('%.4f',$callTime)); if($this->db->trans_status() === TRUE){ $this->_show_msg('1',array('data'=>'import ok')); }else{ $this->_show_error('saveOrUpdate error'); }

codeigniter使用技巧批量插入数据实例方法分享codeigniter使用技巧批量插入数据实例方法分享codeigniter使用技巧批量插入数据实例方法分享

复制代码 代码如下:$sub_form = array();$loop = 0;$ins_loop = 0;$sum = count($form_datas);$this->logger->info('insert data total:'.$sum);//使用事物批量导入有助于提高插入效率$callStartTime = microtime(true);$this->db->trans_start();foreach ( $form_datas as $item ) { $loop ++; $sub_form[] = $item; if(($loop % 200) == 0 || $loop == $sum){ $this->logger->info('insert data num:'.$loop);$res = $this->kb_object_instance_mdl->insert_batch($sub_form,$obj_id);$ins_loop ++;unset($sub_form);if(($ins_loop % 5) == 0){$this->logger->info('insert data trans_complete ins_loop:'.$ins_loop); $this->db->trans_complete(); if($loop != $sum){ $this->db->trans_start(); }} }}//$this->db->trans_complete();$callEndTime = microtime(true);$callTime = $callEndTime - $callStartTime;$this->logger->info('insert data use time:'.sprintf('%.4f',$callTime)); if($this->db->trans_status() === TRUE){ $this->_show_msg('1',array('data'=>'import ok')); }else{ $this->_show_error('saveOrUpdate error'); }

codeigniter使用技巧批量插入数据实例方法分享

复制代码 代码如下:$sub_form = array();$loop = 0;$ins_loop = 0;$sum = count($form_datas);$this->logger->info('insert data total:'.$sum);//使用事物批量导入有助于提高插入效率$callStartTime = microtime(true);$this->db->trans_start();foreach ( $form_datas as $item ) { $loop ++; $sub_form[] = $item; if(($loop % 200) == 0 || $loop == $sum){ $this->logger->info('insert data num:'.$loop);$res = $this->kb_object_instance_mdl->insert_batch($sub_form,$obj_id);$ins_loop ++;unset($sub_form);if(($ins_loop % 5) == 0){$this->logger->info('insert data trans_complete ins_loop:'.$ins_loop); $this->db->trans_complete(); if($loop != $sum){ $this->db->trans_start(); }} }}//$this->db->trans_complete();$callEndTime = microtime(true);$callTime = $callEndTime - $callStartTime;$this->logger->info('insert data use time:'.sprintf('%.4f',$callTime)); if($this->db->trans_status() === TRUE){ $this->_show_msg('1',array('data'=>'import ok')); }else{ $this->_show_error('saveOrUpdate error'); }

,见下图

codeigniter使用技巧批量插入数据实例方法分享

复制代码 代码如下:$sub_form = array();$loop = 0;$ins_loop = 0;$sum = count($form_datas);$this->logger->info('insert data total:'.$sum);//使用事物批量导入有助于提高插入效率$callStartTime = microtime(true);$this->db->trans_start();foreach ( $form_datas as $item ) { $loop ++; $sub_form[] = $item; if(($loop % 200) == 0 || $loop == $sum){ $this->logger->info('insert data num:'.$loop);$res = $this->kb_object_instance_mdl->insert_batch($sub_form,$obj_id);$ins_loop ++;unset($sub_form);if(($ins_loop % 5) == 0){$this->logger->info('insert data trans_complete ins_loop:'.$ins_loop); $this->db->trans_complete(); if($loop != $sum){ $this->db->trans_start(); }} }}//$this->db->trans_complete();$callEndTime = microtime(true);$callTime = $callEndTime - $callStartTime;$this->logger->info('insert data use time:'.sprintf('%.4f',$callTime)); if($this->db->trans_status() === TRUE){ $this->_show_msg('1',array('data'=>'import ok')); }else{ $this->_show_error('saveOrUpdate error'); }

复制代码 代码如下:$sub_form = array();$loop = 0;$ins_loop = 0;$sum = count($form_datas);$this->logger->info('insert data total:'.$sum);//使用事物批量导入有助于提高插入效率$callStartTime = microtime(true);$this->db->trans_start();foreach ( $form_datas as $item ) { $loop ++; $sub_form[] = $item; if(($loop % 200) == 0 || $loop == $sum){ $this->logger->info('insert data num:'.$loop);$res = $this->kb_object_instance_mdl->insert_batch($sub_form,$obj_id);$ins_loop ++;unset($sub_form);if(($ins_loop % 5) == 0){$this->logger->info('insert data trans_complete ins_loop:'.$ins_loop); $this->db->trans_complete(); if($loop != $sum){ $this->db->trans_start(); }} }}//$this->db->trans_complete();$callEndTime = microtime(true);$callTime = $callEndTime - $callStartTime;$this->logger->info('insert data use time:'.sprintf('%.4f',$callTime)); if($this->db->trans_status() === TRUE){ $this->_show_msg('1',array('data'=>'import ok')); }else{ $this->_show_error('saveOrUpdate error'); }

,见下图

复制代码 代码如下:$sub_form = array();$loop = 0;$ins_loop = 0;$sum = count($form_datas);$this->logger->info('insert data total:'.$sum);//使用事物批量导入有助于提高插入效率$callStartTime = microtime(true);$this->db->trans_start();foreach ( $form_datas as $item ) { $loop ++; $sub_form[] = $item; if(($loop % 200) == 0 || $loop == $sum){ $this->logger->info('insert data num:'.$loop);$res = $this->kb_object_instance_mdl->insert_batch($sub_form,$obj_id);$ins_loop ++;unset($sub_form);if(($ins_loop % 5) == 0){$this->logger->info('insert data trans_complete ins_loop:'.$ins_loop); $this->db->trans_complete(); if($loop != $sum){ $this->db->trans_start(); }} }}//$this->db->trans_complete();$callEndTime = microtime(true);$callTime = $callEndTime - $callStartTime;$this->logger->info('insert data use time:'.sprintf('%.4f',$callTime)); if($this->db->trans_status() === TRUE){ $this->_show_msg('1',array('data'=>'import ok')); }else{ $this->_show_error('saveOrUpdate error'); }

复制代码 代码如下:$sub_form = array();$loop = 0;$ins_loop = 0;$sum = count($form_datas);$this->logger->info('insert data total:'.$sum);//使用事物批量导入有助于提高插入效率$callStartTime = microtime(true);$this->db->trans_start();foreach ( $form_datas as $item ) { $loop ++; $sub_form[] = $item; if(($loop % 200) == 0 || $loop == $sum){ $this->logger->info('insert data num:'.$loop);$res = $this->kb_object_instance_mdl->insert_batch($sub_form,$obj_id);$ins_loop ++;unset($sub_form);if(($ins_loop % 5) == 0){$this->logger->info('insert data trans_complete ins_loop:'.$ins_loop); $this->db->trans_complete(); if($loop != $sum){ $this->db->trans_start(); }} }}//$this->db->trans_complete();$callEndTime = microtime(true);$callTime = $callEndTime - $callStartTime;$this->logger->info('insert data use time:'.sprintf('%.4f',$callTime)); if($this->db->trans_status() === TRUE){ $this->_show_msg('1',array('data'=>'import ok')); }else{ $this->_show_error('saveOrUpdate error'); }

codeigniter使用技巧批量插入数据实例方法分享

复制代码 代码如下:$sub_form = array();$loop = 0;$ins_loop = 0;$sum = count($form_datas);$this->logger->info('insert data total:'.$sum);//使用事物批量导入有助于提高插入效率$callStartTime = microtime(true);$this->db->trans_start();foreach ( $form_datas as $item ) { $loop ++; $sub_form[] = $item; if(($loop % 200) == 0 || $loop == $sum){ $this->logger->info('insert data num:'.$loop);$res = $this->kb_object_instance_mdl->insert_batch($sub_form,$obj_id);$ins_loop ++;unset($sub_form);if(($ins_loop % 5) == 0){$this->logger->info('insert data trans_complete ins_loop:'.$ins_loop); $this->db->trans_complete(); if($loop != $sum){ $this->db->trans_start(); }} }}//$this->db->trans_complete();$callEndTime = microtime(true);$callTime = $callEndTime - $callStartTime;$this->logger->info('insert data use time:'.sprintf('%.4f',$callTime)); if($this->db->trans_status() === TRUE){ $this->_show_msg('1',array('data'=>'import ok')); }else{ $this->_show_error('saveOrUpdate error'); }

,如下图

codeigniter使用技巧批量插入数据实例方法分享codeigniter使用技巧批量插入数据实例方法分享

codeigniter使用技巧批量插入数据实例方法分享

如下图

codeigniter使用技巧批量插入数据实例方法分享,如下图

codeigniter使用技巧批量插入数据实例方法分享

复制代码 代码如下:$sub_form = array();$loop = 0;$ins_loop = 0;$sum = count($form_datas);$this->logger->info('insert data total:'.$sum);//使用事物批量导入有助于提高插入效率$callStartTime = microtime(true);$this->db->trans_start();foreach ( $form_datas as $item ) { $loop ++; $sub_form[] = $item; if(($loop % 200) == 0 || $loop == $sum){ $this->logger->info('insert data num:'.$loop);$res = $this->kb_object_instance_mdl->insert_batch($sub_form,$obj_id);$ins_loop ++;unset($sub_form);if(($ins_loop % 5) == 0){$this->logger->info('insert data trans_complete ins_loop:'.$ins_loop); $this->db->trans_complete(); if($loop != $sum){ $this->db->trans_start(); }} }}//$this->db->trans_complete();$callEndTime = microtime(true);$callTime = $callEndTime - $callStartTime;$this->logger->info('insert data use time:'.sprintf('%.4f',$callTime)); if($this->db->trans_status() === TRUE){ $this->_show_msg('1',array('data'=>'import ok')); }else{ $this->_show_error('saveOrUpdate error'); }

,见图

永利真人赌博codeigniter使用技巧批量插入数据实例方法分享codeigniter使用技巧批量插入数据实例方法分享

复制代码 代码如下:$sub_form = array();$loop = 0;$ins_loop = 0;$sum = count($form_datas);$this->logger->info('insert data total:'.$sum);//使用事物批量导入有助于提高插入效率$callStartTime = microtime(true);$this->db->trans_start();foreach ( $form_datas as $item ) { $loop ++; $sub_form[] = $item; if(($loop % 200) == 0 || $loop == $sum){ $this->logger->info('insert data num:'.$loop);$res = $this->kb_object_instance_mdl->insert_batch($sub_form,$obj_id);$ins_loop ++;unset($sub_form);if(($ins_loop % 5) == 0){$this->logger->info('insert data trans_complete ins_loop:'.$ins_loop); $this->db->trans_complete(); if($loop != $sum){ $this->db->trans_start(); }} }}//$this->db->trans_complete();$callEndTime = microtime(true);$callTime = $callEndTime - $callStartTime;$this->logger->info('insert data use time:'.sprintf('%.4f',$callTime)); if($this->db->trans_status() === TRUE){ $this->_show_msg('1',array('data'=>'import ok')); }else{ $this->_show_error('saveOrUpdate error'); }

复制代码 代码如下:$sub_form = array();$loop = 0;$ins_loop = 0;$sum = count($form_datas);$this->logger->info('insert data total:'.$sum);//使用事物批量导入有助于提高插入效率$callStartTime = microtime(true);$this->db->trans_start();foreach ( $form_datas as $item ) { $loop ++; $sub_form[] = $item; if(($loop % 200) == 0 || $loop == $sum){ $this->logger->info('insert data num:'.$loop);$res = $this->kb_object_instance_mdl->insert_batch($sub_form,$obj_id);$ins_loop ++;unset($sub_form);if(($ins_loop % 5) == 0){$this->logger->info('insert data trans_complete ins_loop:'.$ins_loop); $this->db->trans_complete(); if($loop != $sum){ $this->db->trans_start(); }} }}//$this->db->trans_complete();$callEndTime = microtime(true);$callTime = $callEndTime - $callStartTime;$this->logger->info('insert data use time:'.sprintf('%.4f',$callTime)); if($this->db->trans_status() === TRUE){ $this->_show_msg('1',array('data'=>'import ok')); }else{ $this->_show_error('saveOrUpdate error'); }

复制代码 代码如下:$sub_form = array();$loop = 0;$ins_loop = 0;$sum = count($form_datas);$this->logger->info('insert data total:'.$sum);//使用事物批量导入有助于提高插入效率$callStartTime = microtime(true);$this->db->trans_start();foreach ( $form_datas as $item ) { $loop ++; $sub_form[] = $item; if(($loop % 200) == 0 || $loop == $sum){ $this->logger->info('insert data num:'.$loop);$res = $this->kb_object_instance_mdl->insert_batch($sub_form,$obj_id);$ins_loop ++;unset($sub_form);if(($ins_loop % 5) == 0){$this->logger->info('insert data trans_complete ins_loop:'.$ins_loop); $this->db->trans_complete(); if($loop != $sum){ $this->db->trans_start(); }} }}//$this->db->trans_complete();$callEndTime = microtime(true);$callTime = $callEndTime - $callStartTime;$this->logger->info('insert data use time:'.sprintf('%.4f',$callTime)); if($this->db->trans_status() === TRUE){ $this->_show_msg('1',array('data'=>'import ok')); }else{ $this->_show_error('saveOrUpdate error'); }

复制代码 代码如下:$sub_form = array();$loop = 0;$ins_loop = 0;$sum = count($form_datas);$this->logger->info('insert data total:'.$sum);//使用事物批量导入有助于提高插入效率$callStartTime = microtime(true);$this->db->trans_start();foreach ( $form_datas as $item ) { $loop ++; $sub_form[] = $item; if(($loop % 200) == 0 || $loop == $sum){ $this->logger->info('insert data num:'.$loop);$res = $this->kb_object_instance_mdl->insert_batch($sub_form,$obj_id);$ins_loop ++;unset($sub_form);if(($ins_loop % 5) == 0){$this->logger->info('insert data trans_complete ins_loop:'.$ins_loop); $this->db->trans_complete(); if($loop != $sum){ $this->db->trans_start(); }} }}//$this->db->trans_complete();$callEndTime = microtime(true);$callTime = $callEndTime - $callStartTime;$this->logger->info('insert data use time:'.sprintf('%.4f',$callTime)); if($this->db->trans_status() === TRUE){ $this->_show_msg('1',array('data'=>'import ok')); }else{ $this->_show_error('saveOrUpdate error'); }

codeigniter使用技巧批量插入数据实例方法分享

复制代码 代码如下:$sub_form = array();$loop = 0;$ins_loop = 0;$sum = count($form_datas);$this->logger->info('insert data total:'.$sum);//使用事物批量导入有助于提高插入效率$callStartTime = microtime(true);$this->db->trans_start();foreach ( $form_datas as $item ) { $loop ++; $sub_form[] = $item; if(($loop % 200) == 0 || $loop == $sum){ $this->logger->info('insert data num:'.$loop);$res = $this->kb_object_instance_mdl->insert_batch($sub_form,$obj_id);$ins_loop ++;unset($sub_form);if(($ins_loop % 5) == 0){$this->logger->info('insert data trans_complete ins_loop:'.$ins_loop); $this->db->trans_complete(); if($loop != $sum){ $this->db->trans_start(); }} }}//$this->db->trans_complete();$callEndTime = microtime(true);$callTime = $callEndTime - $callStartTime;$this->logger->info('insert data use time:'.sprintf('%.4f',$callTime)); if($this->db->trans_status() === TRUE){ $this->_show_msg('1',array('data'=>'import ok')); }else{ $this->_show_error('saveOrUpdate error'); }

codeigniter使用技巧批量插入数据实例方法分享codeigniter使用技巧批量插入数据实例方法分享

codeigniter使用技巧批量插入数据实例方法分享

复制代码 代码如下:$sub_form = array();$loop = 0;$ins_loop = 0;$sum = count($form_datas);$this->logger->info('insert data total:'.$sum);//使用事物批量导入有助于提高插入效率$callStartTime = microtime(true);$this->db->trans_start();foreach ( $form_datas as $item ) { $loop ++; $sub_form[] = $item; if(($loop % 200) == 0 || $loop == $sum){ $this->logger->info('insert data num:'.$loop);$res = $this->kb_object_instance_mdl->insert_batch($sub_form,$obj_id);$ins_loop ++;unset($sub_form);if(($ins_loop % 5) == 0){$this->logger->info('insert data trans_complete ins_loop:'.$ins_loop); $this->db->trans_complete(); if($loop != $sum){ $this->db->trans_start(); }} }}//$this->db->trans_complete();$callEndTime = microtime(true);$callTime = $callEndTime - $callStartTime;$this->logger->info('insert data use time:'.sprintf('%.4f',$callTime)); if($this->db->trans_status() === TRUE){ $this->_show_msg('1',array('data'=>'import ok')); }else{ $this->_show_error('saveOrUpdate error'); }

复制代码 代码如下:$sub_form = array();$loop = 0;$ins_loop = 0;$sum = count($form_datas);$this->logger->info('insert data total:'.$sum);//使用事物批量导入有助于提高插入效率$callStartTime = microtime(true);$this->db->trans_start();foreach ( $form_datas as $item ) { $loop ++; $sub_form[] = $item; if(($loop % 200) == 0 || $loop == $sum){ $this->logger->info('insert data num:'.$loop);$res = $this->kb_object_instance_mdl->insert_batch($sub_form,$obj_id);$ins_loop ++;unset($sub_form);if(($ins_loop % 5) == 0){$this->logger->info('insert data trans_complete ins_loop:'.$ins_loop); $this->db->trans_complete(); if($loop != $sum){ $this->db->trans_start(); }} }}//$this->db->trans_complete();$callEndTime = microtime(true);$callTime = $callEndTime - $callStartTime;$this->logger->info('insert data use time:'.sprintf('%.4f',$callTime)); if($this->db->trans_status() === TRUE){ $this->_show_msg('1',array('data'=>'import ok')); }else{ $this->_show_error('saveOrUpdate error'); }

复制代码 代码如下:$sub_form = array();$loop = 0;$ins_loop = 0;$sum = count($form_datas);$this->logger->info('insert data total:'.$sum);//使用事物批量导入有助于提高插入效率$callStartTime = microtime(true);$this->db->trans_start();foreach ( $form_datas as $item ) { $loop ++; $sub_form[] = $item; if(($loop % 200) == 0 || $loop == $sum){ $this->logger->info('insert data num:'.$loop);$res = $this->kb_object_instance_mdl->insert_batch($sub_form,$obj_id);$ins_loop ++;unset($sub_form);if(($ins_loop % 5) == 0){$this->logger->info('insert data trans_complete ins_loop:'.$ins_loop); $this->db->trans_complete(); if($loop != $sum){ $this->db->trans_start(); }} }}//$this->db->trans_complete();$callEndTime = microtime(true);$callTime = $callEndTime - $callStartTime;$this->logger->info('insert data use time:'.sprintf('%.4f',$callTime)); if($this->db->trans_status() === TRUE){ $this->_show_msg('1',array('data'=>'import ok')); }else{ $this->_show_error('saveOrUpdate error'); }

codeigniter使用技巧批量插入数据实例方法分享codeigniter使用技巧批量插入数据实例方法分享

复制代码 代码如下:$sub_form = array();$loop = 0;$ins_loop = 0;$sum = count($form_datas);$this->logger->info('insert data total:'.$sum);//使用事物批量导入有助于提高插入效率$callStartTime = microtime(true);$this->db->trans_start();foreach ( $form_datas as $item ) { $loop ++; $sub_form[] = $item; if(($loop % 200) == 0 || $loop == $sum){ $this->logger->info('insert data num:'.$loop);$res = $this->kb_object_instance_mdl->insert_batch($sub_form,$obj_id);$ins_loop ++;unset($sub_form);if(($ins_loop % 5) == 0){$this->logger->info('insert data trans_complete ins_loop:'.$ins_loop); $this->db->trans_complete(); if($loop != $sum){ $this->db->trans_start(); }} }}//$this->db->trans_complete();$callEndTime = microtime(true);$callTime = $callEndTime - $callStartTime;$this->logger->info('insert data use time:'.sprintf('%.4f',$callTime)); if($this->db->trans_status() === TRUE){ $this->_show_msg('1',array('data'=>'import ok')); }else{ $this->_show_error('saveOrUpdate error'); }

复制代码 代码如下:$sub_form = array();$loop = 0;$ins_loop = 0;$sum = count($form_datas);$this->logger->info('insert data total:'.$sum);//使用事物批量导入有助于提高插入效率$callStartTime = microtime(true);$this->db->trans_start();foreach ( $form_datas as $item ) { $loop ++; $sub_form[] = $item; if(($loop % 200) == 0 || $loop == $sum){ $this->logger->info('insert data num:'.$loop);$res = $this->kb_object_instance_mdl->insert_batch($sub_form,$obj_id);$ins_loop ++;unset($sub_form);if(($ins_loop % 5) == 0){$this->logger->info('insert data trans_complete ins_loop:'.$ins_loop); $this->db->trans_complete(); if($loop != $sum){ $this->db->trans_start(); }} }}//$this->db->trans_complete();$callEndTime = microtime(true);$callTime = $callEndTime - $callStartTime;$this->logger->info('insert data use time:'.sprintf('%.4f',$callTime)); if($this->db->trans_status() === TRUE){ $this->_show_msg('1',array('data'=>'import ok')); }else{ $this->_show_error('saveOrUpdate error'); }

复制代码 代码如下:$sub_form = array();$loop = 0;$ins_loop = 0;$sum = count($form_datas);$this->logger->info('insert data total:'.$sum);//使用事物批量导入有助于提高插入效率$callStartTime = microtime(true);$this->db->trans_start();foreach ( $form_datas as $item ) { $loop ++; $sub_form[] = $item; if(($loop % 200) == 0 || $loop == $sum){ $this->logger->info('insert data num:'.$loop);$res = $this->kb_object_instance_mdl->insert_batch($sub_form,$obj_id);$ins_loop ++;unset($sub_form);if(($ins_loop % 5) == 0){$this->logger->info('insert data trans_complete ins_loop:'.$ins_loop); $this->db->trans_complete(); if($loop != $sum){ $this->db->trans_start(); }} }}//$this->db->trans_complete();$callEndTime = microtime(true);$callTime = $callEndTime - $callStartTime;$this->logger->info('insert data use time:'.sprintf('%.4f',$callTime)); if($this->db->trans_status() === TRUE){ $this->_show_msg('1',array('data'=>'import ok')); }else{ $this->_show_error('saveOrUpdate error'); }

codeigniter使用技巧批量插入数据实例方法分享

复制代码 代码如下:$sub_form = array();$loop = 0;$ins_loop = 0;$sum = count($form_datas);$this->logger->info('insert data total:'.$sum);//使用事物批量导入有助于提高插入效率$callStartTime = microtime(true);$this->db->trans_start();foreach ( $form_datas as $item ) { $loop ++; $sub_form[] = $item; if(($loop % 200) == 0 || $loop == $sum){ $this->logger->info('insert data num:'.$loop);$res = $this->kb_object_instance_mdl->insert_batch($sub_form,$obj_id);$ins_loop ++;unset($sub_form);if(($ins_loop % 5) == 0){$this->logger->info('insert data trans_complete ins_loop:'.$ins_loop); $this->db->trans_complete(); if($loop != $sum){ $this->db->trans_start(); }} }}//$this->db->trans_complete();$callEndTime = microtime(true);$callTime = $callEndTime - $callStartTime;$this->logger->info('insert data use time:'.sprintf('%.4f',$callTime)); if($this->db->trans_status() === TRUE){ $this->_show_msg('1',array('data'=>'import ok')); }else{ $this->_show_error('saveOrUpdate error'); }

codeigniter使用技巧批量插入数据实例方法分享

复制代码 代码如下:$sub_form = array();$loop = 0;$ins_loop = 0;$sum = count($form_datas);$this->logger->info('insert data total:'.$sum);//使用事物批量导入有助于提高插入效率$callStartTime = microtime(true);$this->db->trans_start();foreach ( $form_datas as $item ) { $loop ++; $sub_form[] = $item; if(($loop % 200) == 0 || $loop == $sum){ $this->logger->info('insert data num:'.$loop);$res = $this->kb_object_instance_mdl->insert_batch($sub_form,$obj_id);$ins_loop ++;unset($sub_form);if(($ins_loop % 5) == 0){$this->logger->info('insert data trans_complete ins_loop:'.$ins_loop); $this->db->trans_complete(); if($loop != $sum){ $this->db->trans_start(); }} }}//$this->db->trans_complete();$callEndTime = microtime(true);$callTime = $callEndTime - $callStartTime;$this->logger->info('insert data use time:'.sprintf('%.4f',$callTime)); if($this->db->trans_status() === TRUE){ $this->_show_msg('1',array('data'=>'import ok')); }else{ $this->_show_error('saveOrUpdate error'); }

codeigniter使用技巧批量插入数据实例方法分享

复制代码 代码如下:$sub_form = array();$loop = 0;$ins_loop = 0;$sum = count($form_datas);$this->logger->info('insert data total:'.$sum);//使用事物批量导入有助于提高插入效率$callStartTime = microtime(true);$this->db->trans_start();foreach ( $form_datas as $item ) { $loop ++; $sub_form[] = $item; if(($loop % 200) == 0 || $loop == $sum){ $this->logger->info('insert data num:'.$loop);$res = $this->kb_object_instance_mdl->insert_batch($sub_form,$obj_id);$ins_loop ++;unset($sub_form);if(($ins_loop % 5) == 0){$this->logger->info('insert data trans_complete ins_loop:'.$ins_loop); $this->db->trans_complete(); if($loop != $sum){ $this->db->trans_start(); }} }}//$this->db->trans_complete();$callEndTime = microtime(true);$callTime = $callEndTime - $callStartTime;$this->logger->info('insert data use time:'.sprintf('%.4f',$callTime)); if($this->db->trans_status() === TRUE){ $this->_show_msg('1',array('data'=>'import ok')); }else{ $this->_show_error('saveOrUpdate error'); }

复制代码 代码如下:$sub_form = array();$loop = 0;$ins_loop = 0;$sum = count($form_datas);$this->logger->info('insert data total:'.$sum);//使用事物批量导入有助于提高插入效率$callStartTime = microtime(true);$this->db->trans_start();foreach ( $form_datas as $item ) { $loop ++; $sub_form[] = $item; if(($loop % 200) == 0 || $loop == $sum){ $this->logger->info('insert data num:'.$loop);$res = $this->kb_object_instance_mdl->insert_batch($sub_form,$obj_id);$ins_loop ++;unset($sub_form);if(($ins_loop % 5) == 0){$this->logger->info('insert data trans_complete ins_loop:'.$ins_loop); $this->db->trans_complete(); if($loop != $sum){ $this->db->trans_start(); }} }}//$this->db->trans_complete();$callEndTime = microtime(true);$callTime = $callEndTime - $callStartTime;$this->logger->info('insert data use time:'.sprintf('%.4f',$callTime)); if($this->db->trans_status() === TRUE){ $this->_show_msg('1',array('data'=>'import ok')); }else{ $this->_show_error('saveOrUpdate error'); }

永利真人赌博

复制代码 代码如下:$sub_form = array();$loop = 0;$ins_loop = 0;$sum = count($form_datas);$this->logger->info('insert data total:'.$sum);//使用事物批量导入有助于提高插入效率$callStartTime = microtime(true);$this->db->trans_start();foreach ( $form_datas as $item ) { $loop ++; $sub_form[] = $item; if(($loop % 200) == 0 || $loop == $sum){ $this->logger->info('insert data num:'.$loop);$res = $this->kb_object_instance_mdl->insert_batch($sub_form,$obj_id);$ins_loop ++;unset($sub_form);if(($ins_loop % 5) == 0){$this->logger->info('insert data trans_complete ins_loop:'.$ins_loop); $this->db->trans_complete(); if($loop != $sum){ $this->db->trans_start(); }} }}//$this->db->trans_complete();$callEndTime = microtime(true);$callTime = $callEndTime - $callStartTime;$this->logger->info('insert data use time:'.sprintf('%.4f',$callTime)); if($this->db->trans_status() === TRUE){ $this->_show_msg('1',array('data'=>'import ok')); }else{ $this->_show_error('saveOrUpdate error'); }

codeigniter使用技巧批量插入数据实例方法分享codeigniter使用技巧批量插入数据实例方法分享

复制代码 代码如下:$sub_form = array();$loop = 0;$ins_loop = 0;$sum = count($form_datas);$this->logger->info('insert data total:'.$sum);//使用事物批量导入有助于提高插入效率$callStartTime = microtime(true);$this->db->trans_start();foreach ( $form_datas as $item ) { $loop ++; $sub_form[] = $item; if(($loop % 200) == 0 || $loop == $sum){ $this->logger->info('insert data num:'.$loop);$res = $this->kb_object_instance_mdl->insert_batch($sub_form,$obj_id);$ins_loop ++;unset($sub_form);if(($ins_loop % 5) == 0){$this->logger->info('insert data trans_complete ins_loop:'.$ins_loop); $this->db->trans_complete(); if($loop != $sum){ $this->db->trans_start(); }} }}//$this->db->trans_complete();$callEndTime = microtime(true);$callTime = $callEndTime - $callStartTime;$this->logger->info('insert data use time:'.sprintf('%.4f',$callTime)); if($this->db->trans_status() === TRUE){ $this->_show_msg('1',array('data'=>'import ok')); }else{ $this->_show_error('saveOrUpdate error'); }

复制代码 代码如下:$sub_form = array();$loop = 0;$ins_loop = 0;$sum = count($form_datas);$this->logger->info('insert data total:'.$sum);//使用事物批量导入有助于提高插入效率$callStartTime = microtime(true);$this->db->trans_start();foreach ( $form_datas as $item ) { $loop ++; $sub_form[] = $item; if(($loop % 200) == 0 || $loop == $sum){ $this->logger->info('insert data num:'.$loop);$res = $this->kb_object_instance_mdl->insert_batch($sub_form,$obj_id);$ins_loop ++;unset($sub_form);if(($ins_loop % 5) == 0){$this->logger->info('insert data trans_complete ins_loop:'.$ins_loop); $this->db->trans_complete(); if($loop != $sum){ $this->db->trans_start(); }} }}//$this->db->trans_complete();$callEndTime = microtime(true);$callTime = $callEndTime - $callStartTime;$this->logger->info('insert data use time:'.sprintf('%.4f',$callTime)); if($this->db->trans_status() === TRUE){ $this->_show_msg('1',array('data'=>'import ok')); }else{ $this->_show_error('saveOrUpdate error'); }

codeigniter使用技巧批量插入数据实例方法分享codeigniter使用技巧批量插入数据实例方法分享codeigniter使用技巧批量插入数据实例方法分享codeigniter使用技巧批量插入数据实例方法分享

复制代码 代码如下:$sub_form = array();$loop = 0;$ins_loop = 0;$sum = count($form_datas);$this->logger->info('insert data total:'.$sum);//使用事物批量导入有助于提高插入效率$callStartTime = microtime(true);$this->db->trans_start();foreach ( $form_datas as $item ) { $loop ++; $sub_form[] = $item; if(($loop % 200) == 0 || $loop == $sum){ $this->logger->info('insert data num:'.$loop);$res = $this->kb_object_instance_mdl->insert_batch($sub_form,$obj_id);$ins_loop ++;unset($sub_form);if(($ins_loop % 5) == 0){$this->logger->info('insert data trans_complete ins_loop:'.$ins_loop); $this->db->trans_complete(); if($loop != $sum){ $this->db->trans_start(); }} }}//$this->db->trans_complete();$callEndTime = microtime(true);$callTime = $callEndTime - $callStartTime;$this->logger->info('insert data use time:'.sprintf('%.4f',$callTime)); if($this->db->trans_status() === TRUE){ $this->_show_msg('1',array('data'=>'import ok')); }else{ $this->_show_error('saveOrUpdate error'); }

codeigniter使用技巧批量插入数据实例方法分享

1.

复制代码 代码如下:$sub_form = array();$loop = 0;$ins_loop = 0;$sum = count($form_datas);$this->logger->info('insert data total:'.$sum);//使用事物批量导入有助于提高插入效率$callStartTime = microtime(true);$this->db->trans_start();foreach ( $form_datas as $item ) { $loop ++; $sub_form[] = $item; if(($loop % 200) == 0 || $loop == $sum){ $this->logger->info('insert data num:'.$loop);$res = $this->kb_object_instance_mdl->insert_batch($sub_form,$obj_id);$ins_loop ++;unset($sub_form);if(($ins_loop % 5) == 0){$this->logger->info('insert data trans_complete ins_loop:'.$ins_loop); $this->db->trans_complete(); if($loop != $sum){ $this->db->trans_start(); }} }}//$this->db->trans_complete();$callEndTime = microtime(true);$callTime = $callEndTime - $callStartTime;$this->logger->info('insert data use time:'.sprintf('%.4f',$callTime)); if($this->db->trans_status() === TRUE){ $this->_show_msg('1',array('data'=>'import ok')); }else{ $this->_show_error('saveOrUpdate error'); }

复制代码 代码如下:$sub_form = array();$loop = 0;$ins_loop = 0;$sum = count($form_datas);$this->logger->info('insert data total:'.$sum);//使用事物批量导入有助于提高插入效率$callStartTime = microtime(true);$this->db->trans_start();foreach ( $form_datas as $item ) { $loop ++; $sub_form[] = $item; if(($loop % 200) == 0 || $loop == $sum){ $this->logger->info('insert data num:'.$loop);$res = $this->kb_object_instance_mdl->insert_batch($sub_form,$obj_id);$ins_loop ++;unset($sub_form);if(($ins_loop % 5) == 0){$this->logger->info('insert data trans_complete ins_loop:'.$ins_loop); $this->db->trans_complete(); if($loop != $sum){ $this->db->trans_start(); }} }}//$this->db->trans_complete();$callEndTime = microtime(true);$callTime = $callEndTime - $callStartTime;$this->logger->info('insert data use time:'.sprintf('%.4f',$callTime)); if($this->db->trans_status() === TRUE){ $this->_show_msg('1',array('data'=>'import ok')); }else{ $this->_show_error('saveOrUpdate error'); }

复制代码 代码如下:$sub_form = array();$loop = 0;$ins_loop = 0;$sum = count($form_datas);$this->logger->info('insert data total:'.$sum);//使用事物批量导入有助于提高插入效率$callStartTime = microtime(true);$this->db->trans_start();foreach ( $form_datas as $item ) { $loop ++; $sub_form[] = $item; if(($loop % 200) == 0 || $loop == $sum){ $this->logger->info('insert data num:'.$loop);$res = $this->kb_object_instance_mdl->insert_batch($sub_form,$obj_id);$ins_loop ++;unset($sub_form);if(($ins_loop % 5) == 0){$this->logger->info('insert data trans_complete ins_loop:'.$ins_loop); $this->db->trans_complete(); if($loop != $sum){ $this->db->trans_start(); }} }}//$this->db->trans_complete();$callEndTime = microtime(true);$callTime = $callEndTime - $callStartTime;$this->logger->info('insert data use time:'.sprintf('%.4f',$callTime)); if($this->db->trans_status() === TRUE){ $this->_show_msg('1',array('data'=>'import ok')); }else{ $this->_show_error('saveOrUpdate error'); }

复制代码 代码如下:$sub_form = array();$loop = 0;$ins_loop = 0;$sum = count($form_datas);$this->logger->info('insert data total:'.$sum);//使用事物批量导入有助于提高插入效率$callStartTime = microtime(true);$this->db->trans_start();foreach ( $form_datas as $item ) { $loop ++; $sub_form[] = $item; if(($loop % 200) == 0 || $loop == $sum){ $this->logger->info('insert data num:'.$loop);$res = $this->kb_object_instance_mdl->insert_batch($sub_form,$obj_id);$ins_loop ++;unset($sub_form);if(($ins_loop % 5) == 0){$this->logger->info('insert data trans_complete ins_loop:'.$ins_loop); $this->db->trans_complete(); if($loop != $sum){ $this->db->trans_start(); }} }}//$this->db->trans_complete();$callEndTime = microtime(true);$callTime = $callEndTime - $callStartTime;$this->logger->info('insert data use time:'.sprintf('%.4f',$callTime)); if($this->db->trans_status() === TRUE){ $this->_show_msg('1',array('data'=>'import ok')); }else{ $this->_show_error('saveOrUpdate error'); }

codeigniter使用技巧批量插入数据实例方法分享codeigniter使用技巧批量插入数据实例方法分享codeigniter使用技巧批量插入数据实例方法分享

复制代码 代码如下:$sub_form = array();$loop = 0;$ins_loop = 0;$sum = count($form_datas);$this->logger->info('insert data total:'.$sum);//使用事物批量导入有助于提高插入效率$callStartTime = microtime(true);$this->db->trans_start();foreach ( $form_datas as $item ) { $loop ++; $sub_form[] = $item; if(($loop % 200) == 0 || $loop == $sum){ $this->logger->info('insert data num:'.$loop);$res = $this->kb_object_instance_mdl->insert_batch($sub_form,$obj_id);$ins_loop ++;unset($sub_form);if(($ins_loop % 5) == 0){$this->logger->info('insert data trans_complete ins_loop:'.$ins_loop); $this->db->trans_complete(); if($loop != $sum){ $this->db->trans_start(); }} }}//$this->db->trans_complete();$callEndTime = microtime(true);$callTime = $callEndTime - $callStartTime;$this->logger->info('insert data use time:'.sprintf('%.4f',$callTime)); if($this->db->trans_status() === TRUE){ $this->_show_msg('1',array('data'=>'import ok')); }else{ $this->_show_error('saveOrUpdate error'); }

复制代码 代码如下:$sub_form = array();$loop = 0;$ins_loop = 0;$sum = count($form_datas);$this->logger->info('insert data total:'.$sum);//使用事物批量导入有助于提高插入效率$callStartTime = microtime(true);$this->db->trans_start();foreach ( $form_datas as $item ) { $loop ++; $sub_form[] = $item; if(($loop % 200) == 0 || $loop == $sum){ $this->logger->info('insert data num:'.$loop);$res = $this->kb_object_instance_mdl->insert_batch($sub_form,$obj_id);$ins_loop ++;unset($sub_form);if(($ins_loop % 5) == 0){$this->logger->info('insert data trans_complete ins_loop:'.$ins_loop); $this->db->trans_complete(); if($loop != $sum){ $this->db->trans_start(); }} }}//$this->db->trans_complete();$callEndTime = microtime(true);$callTime = $callEndTime - $callStartTime;$this->logger->info('insert data use time:'.sprintf('%.4f',$callTime)); if($this->db->trans_status() === TRUE){ $this->_show_msg('1',array('data'=>'import ok')); }else{ $this->_show_error('saveOrUpdate error'); }

codeigniter使用技巧批量插入数据实例方法分享

复制代码 代码如下:$sub_form = array();$loop = 0;$ins_loop = 0;$sum = count($form_datas);$this->logger->info('insert data total:'.$sum);//使用事物批量导入有助于提高插入效率$callStartTime = microtime(true);$this->db->trans_start();foreach ( $form_datas as $item ) { $loop ++; $sub_form[] = $item; if(($loop % 200) == 0 || $loop == $sum){ $this->logger->info('insert data num:'.$loop);$res = $this->kb_object_instance_mdl->insert_batch($sub_form,$obj_id);$ins_loop ++;unset($sub_form);if(($ins_loop % 5) == 0){$this->logger->info('insert data trans_complete ins_loop:'.$ins_loop); $this->db->trans_complete(); if($loop != $sum){ $this->db->trans_start(); }} }}//$this->db->trans_complete();$callEndTime = microtime(true);$callTime = $callEndTime - $callStartTime;$this->logger->info('insert data use time:'.sprintf('%.4f',$callTime)); if($this->db->trans_status() === TRUE){ $this->_show_msg('1',array('data'=>'import ok')); }else{ $this->_show_error('saveOrUpdate error'); }

复制代码 代码如下:$sub_form = array();$loop = 0;$ins_loop = 0;$sum = count($form_datas);$this->logger->info('insert data total:'.$sum);//使用事物批量导入有助于提高插入效率$callStartTime = microtime(true);$this->db->trans_start();foreach ( $form_datas as $item ) { $loop ++; $sub_form[] = $item; if(($loop % 200) == 0 || $loop == $sum){ $this->logger->info('insert data num:'.$loop);$res = $this->kb_object_instance_mdl->insert_batch($sub_form,$obj_id);$ins_loop ++;unset($sub_form);if(($ins_loop % 5) == 0){$this->logger->info('insert data trans_complete ins_loop:'.$ins_loop); $this->db->trans_complete(); if($loop != $sum){ $this->db->trans_start(); }} }}//$this->db->trans_complete();$callEndTime = microtime(true);$callTime = $callEndTime - $callStartTime;$this->logger->info('insert data use time:'.sprintf('%.4f',$callTime)); if($this->db->trans_status() === TRUE){ $this->_show_msg('1',array('data'=>'import ok')); }else{ $this->_show_error('saveOrUpdate error'); }

codeigniter使用技巧批量插入数据实例方法分享codeigniter使用技巧批量插入数据实例方法分享

复制代码 代码如下:$sub_form = array();$loop = 0;$ins_loop = 0;$sum = count($form_datas);$this->logger->info('insert data total:'.$sum);//使用事物批量导入有助于提高插入效率$callStartTime = microtime(true);$this->db->trans_start();foreach ( $form_datas as $item ) { $loop ++; $sub_form[] = $item; if(($loop % 200) == 0 || $loop == $sum){ $this->logger->info('insert data num:'.$loop);$res = $this->kb_object_instance_mdl->insert_batch($sub_form,$obj_id);$ins_loop ++;unset($sub_form);if(($ins_loop % 5) == 0){$this->logger->info('insert data trans_complete ins_loop:'.$ins_loop); $this->db->trans_complete(); if($loop != $sum){ $this->db->trans_start(); }} }}//$this->db->trans_complete();$callEndTime = microtime(true);$callTime = $callEndTime - $callStartTime;$this->logger->info('insert data use time:'.sprintf('%.4f',$callTime)); if($this->db->trans_status() === TRUE){ $this->_show_msg('1',array('data'=>'import ok')); }else{ $this->_show_error('saveOrUpdate error'); }

codeigniter使用技巧批量插入数据实例方法分享

2.codeigniter使用技巧批量插入数据实例方法分享。

codeigniter使用技巧批量插入数据实例方法分享

复制代码 代码如下:$sub_form = array();$loop = 0;$ins_loop = 0;$sum = count($form_datas);$this->logger->info('insert data total:'.$sum);//使用事物批量导入有助于提高插入效率$callStartTime = microtime(true);$this->db->trans_start();foreach ( $form_datas as $item ) { $loop ++; $sub_form[] = $item; if(($loop % 200) == 0 || $loop == $sum){ $this->logger->info('insert data num:'.$loop);$res = $this->kb_object_instance_mdl->insert_batch($sub_form,$obj_id);$ins_loop ++;unset($sub_form);if(($ins_loop % 5) == 0){$this->logger->info('insert data trans_complete ins_loop:'.$ins_loop); $this->db->trans_complete(); if($loop != $sum){ $this->db->trans_start(); }} }}//$this->db->trans_complete();$callEndTime = microtime(true);$callTime = $callEndTime - $callStartTime;$this->logger->info('insert data use time:'.sprintf('%.4f',$callTime)); if($this->db->trans_status() === TRUE){ $this->_show_msg('1',array('data'=>'import ok')); }else{ $this->_show_error('saveOrUpdate error'); }

复制代码 代码如下:$sub_form = array();$loop = 0;$ins_loop = 0;$sum = count($form_datas);$this->logger->info('insert data total:'.$sum);//使用事物批量导入有助于提高插入效率$callStartTime = microtime(true);$this->db->trans_start();foreach ( $form_datas as $item ) { $loop ++; $sub_form[] = $item; if(($loop % 200) == 0 || $loop == $sum){ $this->logger->info('insert data num:'.$loop);$res = $this->kb_object_instance_mdl->insert_batch($sub_form,$obj_id);$ins_loop ++;unset($sub_form);if(($ins_loop % 5) == 0){$this->logger->info('insert data trans_complete ins_loop:'.$ins_loop); $this->db->trans_complete(); if($loop != $sum){ $this->db->trans_start(); }} }}//$this->db->trans_complete();$callEndTime = microtime(true);$callTime = $callEndTime - $callStartTime;$this->logger->info('insert data use time:'.sprintf('%.4f',$callTime)); if($this->db->trans_status() === TRUE){ $this->_show_msg('1',array('data'=>'import ok')); }else{ $this->_show_error('saveOrUpdate error'); }

codeigniter使用技巧批量插入数据实例方法分享

3.

复制代码 代码如下:$sub_form = array();$loop = 0;$ins_loop = 0;$sum = count($form_datas);$this->logger->info('insert data total:'.$sum);//使用事物批量导入有助于提高插入效率$callStartTime = microtime(true);$this->db->trans_start();foreach ( $form_datas as $item ) { $loop ++; $sub_form[] = $item; if(($loop % 200) == 0 || $loop == $sum){ $this->logger->info('insert data num:'.$loop);$res = $this->kb_object_instance_mdl->insert_batch($sub_form,$obj_id);$ins_loop ++;unset($sub_form);if(($ins_loop % 5) == 0){$this->logger->info('insert data trans_complete ins_loop:'.$ins_loop); $this->db->trans_complete(); if($loop != $sum){ $this->db->trans_start(); }} }}//$this->db->trans_complete();$callEndTime = microtime(true);$callTime = $callEndTime - $callStartTime;$this->logger->info('insert data use time:'.sprintf('%.4f',$callTime)); if($this->db->trans_status() === TRUE){ $this->_show_msg('1',array('data'=>'import ok')); }else{ $this->_show_error('saveOrUpdate error'); }

codeigniter使用技巧批量插入数据实例方法分享codeigniter使用技巧批量插入数据实例方法分享codeigniter使用技巧批量插入数据实例方法分享

复制代码 代码如下:$sub_form = array();$loop = 0;$ins_loop = 0;$sum = count($form_datas);$this->logger->info('insert data total:'.$sum);//使用事物批量导入有助于提高插入效率$callStartTime = microtime(true);$this->db->trans_start();foreach ( $form_datas as $item ) { $loop ++; $sub_form[] = $item; if(($loop % 200) == 0 || $loop == $sum){ $this->logger->info('insert data num:'.$loop);$res = $this->kb_object_instance_mdl->insert_batch($sub_form,$obj_id);$ins_loop ++;unset($sub_form);if(($ins_loop % 5) == 0){$this->logger->info('insert data trans_complete ins_loop:'.$ins_loop); $this->db->trans_complete(); if($loop != $sum){ $this->db->trans_start(); }} }}//$this->db->trans_complete();$callEndTime = microtime(true);$callTime = $callEndTime - $callStartTime;$this->logger->info('insert data use time:'.sprintf('%.4f',$callTime)); if($this->db->trans_status() === TRUE){ $this->_show_msg('1',array('data'=>'import ok')); }else{ $this->_show_error('saveOrUpdate error'); }

codeigniter使用技巧批量插入数据实例方法分享codeigniter使用技巧批量插入数据实例方法分享

复制代码 代码如下:$sub_form = array();$loop = 0;$ins_loop = 0;$sum = count($form_datas);$this->logger->info('insert data total:'.$sum);//使用事物批量导入有助于提高插入效率$callStartTime = microtime(true);$this->db->trans_start();foreach ( $form_datas as $item ) { $loop ++; $sub_form[] = $item; if(($loop % 200) == 0 || $loop == $sum){ $this->logger->info('insert data num:'.$loop);$res = $this->kb_object_instance_mdl->insert_batch($sub_form,$obj_id);$ins_loop ++;unset($sub_form);if(($ins_loop % 5) == 0){$this->logger->info('insert data trans_complete ins_loop:'.$ins_loop); $this->db->trans_complete(); if($loop != $sum){ $this->db->trans_start(); }} }}//$this->db->trans_complete();$callEndTime = microtime(true);$callTime = $callEndTime - $callStartTime;$this->logger->info('insert data use time:'.sprintf('%.4f',$callTime)); if($this->db->trans_status() === TRUE){ $this->_show_msg('1',array('data'=>'import ok')); }else{ $this->_show_error('saveOrUpdate error'); }

4.codeigniter使用技巧批量插入数据实例方法分享。

codeigniter使用技巧批量插入数据实例方法分享codeigniter使用技巧批量插入数据实例方法分享codeigniter使用技巧批量插入数据实例方法分享

复制代码 代码如下:$sub_form = array();$loop = 0;$ins_loop = 0;$sum = count($form_datas);$this->logger->info('insert data total:'.$sum);//使用事物批量导入有助于提高插入效率$callStartTime = microtime(true);$this->db->trans_start();foreach ( $form_datas as $item ) { $loop ++; $sub_form[] = $item; if(($loop % 200) == 0 || $loop == $sum){ $this->logger->info('insert data num:'.$loop);$res = $this->kb_object_instance_mdl->insert_batch($sub_form,$obj_id);$ins_loop ++;unset($sub_form);if(($ins_loop % 5) == 0){$this->logger->info('insert data trans_complete ins_loop:'.$ins_loop); $this->db->trans_complete(); if($loop != $sum){ $this->db->trans_start(); }} }}//$this->db->trans_complete();$callEndTime = microtime(true);$callTime = $callEndTime - $callStartTime;$this->logger->info('insert data use time:'.sprintf('%.4f',$callTime)); if($this->db->trans_status() === TRUE){ $this->_show_msg('1',array('data'=>'import ok')); }else{ $this->_show_error('saveOrUpdate error'); }

复制代码 代码如下:$sub_form = array();$loop = 0;$ins_loop = 0;$sum = count($form_datas);$this->logger->info('insert data total:'.$sum);//使用事物批量导入有助于提高插入效率$callStartTime = microtime(true);$this->db->trans_start();foreach ( $form_datas as $item ) { $loop ++; $sub_form[] = $item; if(($loop % 200) == 0 || $loop == $sum){ $this->logger->info('insert data num:'.$loop);$res = $this->kb_object_instance_mdl->insert_batch($sub_form,$obj_id);$ins_loop ++;unset($sub_form);if(($ins_loop % 5) == 0){$this->logger->info('insert data trans_complete ins_loop:'.$ins_loop); $this->db->trans_complete(); if($loop != $sum){ $this->db->trans_start(); }} }}//$this->db->trans_complete();$callEndTime = microtime(true);$callTime = $callEndTime - $callStartTime;$this->logger->info('insert data use time:'.sprintf('%.4f',$callTime)); if($this->db->trans_status() === TRUE){ $this->_show_msg('1',array('data'=>'import ok')); }else{ $this->_show_error('saveOrUpdate error'); }

复制代码 代码如下:$sub_form = array();$loop = 0;$ins_loop = 0;$sum = count($form_datas);$this->logger->info('insert data total:'.$sum);//使用事物批量导入有助于提高插入效率$callStartTime = microtime(true);$this->db->trans_start();foreach ( $form_datas as $item ) { $loop ++; $sub_form[] = $item; if(($loop % 200) == 0 || $loop == $sum){ $this->logger->info('insert data num:'.$loop);$res = $this->kb_object_instance_mdl->insert_batch($sub_form,$obj_id);$ins_loop ++;unset($sub_form);if(($ins_loop % 5) == 0){$this->logger->info('insert data trans_complete ins_loop:'.$ins_loop); $this->db->trans_complete(); if($loop != $sum){ $this->db->trans_start(); }} }}//$this->db->trans_complete();$callEndTime = microtime(true);$callTime = $callEndTime - $callStartTime;$this->logger->info('insert data use time:'.sprintf('%.4f',$callTime)); if($this->db->trans_status() === TRUE){ $this->_show_msg('1',array('data'=>'import ok')); }else{ $this->_show_error('saveOrUpdate error'); }

复制代码 代码如下:$sub_form = array();$loop = 0;$ins_loop = 0;$sum = count($form_datas);$this->logger->info('insert data total:'.$sum);//使用事物批量导入有助于提高插入效率$callStartTime = microtime(true);$this->db->trans_start();foreach ( $form_datas as $item ) { $loop ++; $sub_form[] = $item; if(($loop % 200) == 0 || $loop == $sum){ $this->logger->info('insert data num:'.$loop);$res = $this->kb_object_instance_mdl->insert_batch($sub_form,$obj_id);$ins_loop ++;unset($sub_form);if(($ins_loop % 5) == 0){$this->logger->info('insert data trans_complete ins_loop:'.$ins_loop); $this->db->trans_complete(); if($loop != $sum){ $this->db->trans_start(); }} }}//$this->db->trans_complete();$callEndTime = microtime(true);$callTime = $callEndTime - $callStartTime;$this->logger->info('insert data use time:'.sprintf('%.4f',$callTime)); if($this->db->trans_status() === TRUE){ $this->_show_msg('1',array('data'=>'import ok')); }else{ $this->_show_error('saveOrUpdate error'); }

codeigniter使用技巧批量插入数据实例方法分享

复制代码 代码如下:$sub_form = array();$loop = 0;$ins_loop = 0;$sum = count($form_datas);$this->logger->info('insert data total:'.$sum);//使用事物批量导入有助于提高插入效率$callStartTime = microtime(true);$this->db->trans_start();foreach ( $form_datas as $item ) { $loop ++; $sub_form[] = $item; if(($loop % 200) == 0 || $loop == $sum){ $this->logger->info('insert data num:'.$loop);$res = $this->kb_object_instance_mdl->insert_batch($sub_form,$obj_id);$ins_loop ++;unset($sub_form);if(($ins_loop % 5) == 0){$this->logger->info('insert data trans_complete ins_loop:'.$ins_loop); $this->db->trans_complete(); if($loop != $sum){ $this->db->trans_start(); }} }}//$this->db->trans_complete();$callEndTime = microtime(true);$callTime = $callEndTime - $callStartTime;$this->logger->info('insert data use time:'.sprintf('%.4f',$callTime)); if($this->db->trans_status() === TRUE){ $this->_show_msg('1',array('data'=>'import ok')); }else{ $this->_show_error('saveOrUpdate error'); }

codeigniter使用技巧批量插入数据实例方法分享codeigniter使用技巧批量插入数据实例方法分享。永利真人赌博

展开全文
相关文章
频繁进出澳门有影响吗

复制代码 代码如下:$sub_form = array();$loop = 0;$ins_loop = 0;$sum = count($form_datas);$this->logger->info('insert data total:'.$sum);//使用事物批量导入有助于提高插入效率$callStartTime = microtime(true);$this->db->trans_start();foreach ( $form_datas as $item ) { $loop ++; $sub_form[] = $item; if(($loop % 200) == 0 || $loop == $sum){ $this->logger->info('insert data num:'.$loop);$res = $this->kb_object_instance_mdl->insert_batch($sub_form,$obj_id);$ins_loop ++;unset($sub_form);if(($ins_loop % 5) == 0){$this->logger->info('insert data trans_complete ins_loop:'.$ins_loop); $this->db->trans_complete(); if($loop != $sum){ $this->db->trans_start(); }} }}//$this->db->trans_complete();$callEndTime = microtime(true);$callTime = $callEndTime - $callStartTime;$this->logger->info('insert data use time:'.sprintf('%.4f',$callTime)); if($this->db->trans_status() === TRUE){ $this->_show_msg('1',array('data'=>'import ok')); }else{ $this->_show_error('saveOrUpdate error'); }

大连亲子娱乐机价格

复制代码 代码如下:$sub_form = array();$loop = 0;$ins_loop = 0;$sum = count($form_datas);$this->logger->info('insert data total:'.$sum);//使用事物批量导入有助于提高插入效率$callStartTime = microtime(true);$this->db->trans_start();foreach ( $form_datas as $item ) { $loop ++; $sub_form[] = $item; if(($loop % 200) == 0 || $loop == $sum){ $this->logger->info('insert data num:'.$loop);$res = $this->kb_object_instance_mdl->insert_batch($sub_form,$obj_id);$ins_loop ++;unset($sub_form);if(($ins_loop % 5) == 0){$this->logger->info('insert data trans_complete ins_loop:'.$ins_loop); $this->db->trans_complete(); if($loop != $sum){ $this->db->trans_start(); }} }}//$this->db->trans_complete();$callEndTime = microtime(true);$callTime = $callEndTime - $callStartTime;$this->logger->info('insert data use time:'.sprintf('%.4f',$callTime)); if($this->db->trans_status() === TRUE){ $this->_show_msg('1',array('data'=>'import ok')); }else{ $this->_show_error('saveOrUpdate error'); }

....

合乐电脑版网页登陆首页

复制代码 代码如下:$sub_form = array();$loop = 0;$ins_loop = 0;$sum = count($form_datas);$this->logger->info('insert data total:'.$sum);//使用事物批量导入有助于提高插入效率$callStartTime = microtime(true);$this->db->trans_start();foreach ( $form_datas as $item ) { $loop ++; $sub_form[] = $item; if(($loop % 200) == 0 || $loop == $sum){ $this->logger->info('insert data num:'.$loop);$res = $this->kb_object_instance_mdl->insert_batch($sub_form,$obj_id);$ins_loop ++;unset($sub_form);if(($ins_loop % 5) == 0){$this->logger->info('insert data trans_complete ins_loop:'.$ins_loop); $this->db->trans_complete(); if($loop != $sum){ $this->db->trans_start(); }} }}//$this->db->trans_complete();$callEndTime = microtime(true);$callTime = $callEndTime - $callStartTime;$this->logger->info('insert data use time:'.sprintf('%.4f',$callTime)); if($this->db->trans_status() === TRUE){ $this->_show_msg('1',array('data'=>'import ok')); }else{ $this->_show_error('saveOrUpdate error'); }

....

澳门厂家定制耐磨玻璃钢管有哪些

codeigniter使用技巧批量插入数据实例方法分享....

大红色宝马娱乐送28开户

codeigniter使用技巧批量插入数据实例方法分享....

相关资讯
热门资讯