Answers for "one value update in db codeigniter 3 documentation"

PHP
2

update in codeigniter query

$data = array(
        'title' => $title,
        'name' => $name,
        'date' => $date
);

$this->db->where('id', $id);
$this->db->update('mytable', $data);
// Produces:
//
//      UPDATE mytable
//      SET title = '{$title}', name = '{$name}', date = '{$date}'
//      WHERE id = $id
Posted by: Guest on December-18-2020
0

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;
	}
Posted by: Guest on July-15-2020

Code answers related to "one value update in db codeigniter 3 documentation"

Browse Popular Code Answers by Language