Method: db::update
Runs an UPDATE query
Info
Syntax
db::update($table, $input, $where)
Parameters
- $table (string) The table name
- $input (mixed) Either a key/value array or a valid MySQL insert string
- $where (mixed) Either a key/value array as AND connected where clause or a simple MySQL where clause string
Return (mixed)
The number of affected rows or an error response
Example
db::update('user', array('username' => 'peter'), array('id' => 1));
// replaces the username of user 1 with peter