update() public method

Compiles an update string and runs the query.
public update ( string $table = '', array $set = NULL, mixed $where = NULL, integer $limit = NULL ) : boolean
$table string
$set array An associative array of update values
$where mixed
$limit integer
return boolean TRUE on success, FALSE on failure
Esempio n. 1
0
 public function update($id, array $data)
 {
     $data = $this->check_fields($data);
     if (array_key_exists('updated', $this->table_fields)) {
         $date['updated'] = date('Y-m-d H:i:s');
     }
     return $this->db->update($this->table, $data, ['id' => $id]);
 }
 public function update($id, array $data)
 {
     return $this->db->update($this->table, $data, ['id' => $id]);
 }