1$data = array(
2 'title' => $title,
3 'name' => $name,
4 'date' => $date
5);
6
7$this->db->where('id', $id);
8$this->db->update('mytable', $data);
9// Produces:
10//
11// UPDATE mytable
12// SET title = '{$title}', name = '{$name}', date = '{$date}'
13// WHERE id = $id
14
1public function update_row(){
2
3 $update_rows = array(
4 'name' => 'rincky',
5 'address' => 'India',
6 'contact' => '98545785',
7 'department' => 'IT',
8
9 );
10 $this->db->where('id', 1 );
11 $result = $this->db->update('user', $update_rows);
12 return $result;
13 }