Welcome Guest, Not a member yet? Register   Sign In
[Solved]Update_batch without escape?
#1

(This post was last modified: 10-20-2016, 09:21 AM by Maeggi07.)

Hello @ll,
have any Idea for escape false in update_batch?

//Für Single
PHP Code:
$this->db->set('field''field+1'FALSE);
$this->db->where('id'2);
$this->db->update('mytable'); 

//Multiple ???
PHP Code:
$data = array(
 
  array(
 
     'id' => 'ID' ,
 
     'field' => 'field+1'          //False?
 
     'points' => 'points+1'       //False?
 
  ),
 
  array(
 
     'id' => 'ID' ,
 
     'field' => 'field+1'          //False?
 
     'points' => 'points+1'       //False?
 
  ),
);

$this->db->update_batch('mytable'$data'id'); 
Reply
#2

Can't happen.

Make 2+ separate updates and if you're concerned about performance, do them inside a transaction.
Reply
#3

I thought to myself Smile

Thanks
Reply




Theme © iAndrew 2016 - Forum software by © MyBB