codeigniter where_not_in
$names = array('Frank', 'Todd', 'James');
$this->db->where_not_in('username', $names);
// Produces: WHERE username NOT IN ('Frank', 'Todd', 'James')
codeigniter where_not_in
$names = array('Frank', 'Todd', 'James');
$this->db->where_not_in('username', $names);
// Produces: WHERE username NOT IN ('Frank', 'Todd', 'James')
codeigniter update
$data = [
'title' => $title,
'name' => $name,
'date' => $date
];
$builder->where('id', $id);
$builder->update($data);
// Produces:
//
// UPDATE mytable
// SET title = '{$title}', name = '{$name}', date = '{$date}'
// WHERE id = $id
codeigniter update query return value
public function update_row(){
$update_rows = array(
'name' => 'rincky',
'address' => 'India',
'contact' => '98545785',
'department' => 'IT',
);
$this->db->where('id', 1 );
$result = $this->db->update('user', $update_rows);
return $result;
}
codeigniter 3 update
$data = array(
'title' => $title,
'name' => $name,
'date' => $date
);
$this->db->where('id', $id);
$this->db->update('mytable', $data);
cideigniter orLike()
$this->db->like('title', 'match'); $this->db->or_like('body', $match);
// WHERE `title` LIKE '%match%' ESCAPE '!' OR `body` LIKE '%match%' ESCAPE '!'
update codeigniter
$this->db->set('fieldname', 'value');
$this->db->where('id', 2);
$this->db->update('tablename');
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us