Answers for "update where in codeigniter"

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

$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
Posted by: Guest on December-30-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
0

update codeigniter

$this->db->set('fieldname', 'value');
$this->db->where('id', 2);
$this->db->update('tablename');
Posted by: Guest on October-14-2021

Code answers related to "update where in codeigniter"

Browse Popular Code Answers by Language