Skip to content

Instantly share code, notes, and snippets.

@birkir
Created February 14, 2011 12:19
Show Gist options
  • Save birkir/825797 to your computer and use it in GitHub Desktop.
Save birkir/825797 to your computer and use it in GitHub Desktop.
<?php
$insert = array(
'name' => 'John Doe',
'username' => 'john',
'email' => 'john@doe.com',
'password' => hash('sha256', 'password', TRUE)
);
$db = DB::insert('users')
->columns(array_keys($insert))
->values($insert)
->execute();
echo $db->id.' var búinn til!';
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment