Method: db::insert

Runs a INSERT query

Info

Syntax

db::insert($table, $input, $ignore=false)

Parameters

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'));