CI数据库操作
同一连接多个数据库切换,db_select($database_name)
$this->db->db_select('aaa');
$res = $this->db->get('z_attr')->result_array();
insert_batch()
insert_batch($table[, $set = NULL[, $escape = NULL[, $batch_size = 100]]])
| 参数: | 
 | 
|---|---|
| 返回: | Number of rows inserted or FALSE on failure | 
| 返回类型: | mixed | 
Compiles and executes batch INSERT statements.
注解
When more than $batch_size rows are provided, multiple INSERT queries will be executed, each trying to insert up to $batch_size rows.
$rs[0]['rs']=1;
$rs[0]['val']=2;        
$res=$this->db->insert_batch('val',$rs);
insert_batch($table[, $set = NULL[, $escape = NULL[, $batch_size = 100]]])
| 参数: | 
 | 
|---|---|
| 返回: | Number of rows inserted or FALSE on failure | 
| 返回类型: | mixed | 
Compiles and executes batch INSERT statements.
注解
When more than $batch_size rows are provided, multiple INSERT queries will be executed, each trying to insert up to $batch_size rows.
 
                     
                    
                 
                    
                
 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号