Wiggum

a php framework

Database: Updates


Simple Update

The update method, like the insert method, accepts an array of column and value pairs containing the columns to be updated. You may constrain the update query using where clauses:

$this->db->table('users')
    ->update(['votes' => 1])
    ->where('id', 1)
    ->execute();

Updating JSON Columns

Write something

$this->db->table('users')->where('active', '=', 1)->update(['name->first_name' => 'John', 'name->last_name' => 'Doe']);

Increment & Decrement

Comming Soon