Method: db::insert
Runs a INSERT query
Info
Syntax
db::insert($table, $input, $ignore=false)
Parameters
- $table (string) The table name
- $input (mixed) Either a key/value array or a valid MySQL insert string
- $ignore (boolean) Set this to true to ignore duplicates
Return (mixed)
The last inserted id if everything went fine or an error response.
Example
$id = db::insert('user', array('username' => 'peter', 'email' => 'peter@example.com'));