Skip to content

Instantly share code, notes, and snippets.

@eklect
Last active August 29, 2015 14:16
Show Gist options
  • Save eklect/f48cc6f76f3e653ede92 to your computer and use it in GitHub Desktop.
Save eklect/f48cc6f76f3e653ede92 to your computer and use it in GitHub Desktop.
Concrete 5.6 → Getting last insert ID from Database
<?php
global $u;
$db = Loader::db();
$a = "INSERT INTO exampleTable(uID,completed) VALUES('$u->uID','false')";
$b = $db->query($a);
$c = $db->insert_ID();
?>
@eklect
Copy link
Author

eklect commented Mar 5, 2015

The case are sensitive in insert_id, its not Insert_ID();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment