1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-07 23:27:17 +02:00

Display auto_increment value of inserted item

This commit is contained in:
Jakub Vrana
2010-05-12 18:07:46 +02:00
parent 22eb69b562
commit 29e7f041a3
7 changed files with 28 additions and 3 deletions

View File

@@ -500,6 +500,11 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
return queries("INSERT INTO " . table($table) . ($set ? " (" . implode(", ", array_keys($set)) . ")\nVALUES (" . implode(", ", $set) . ")" : "DEFAULT VALUES"));
}
function last_id() {
global $connection;
return $connection->result("SELECT LAST_INSERT_ROWID()");
}
function explain($connection, $query) {
return $connection->query("EXPLAIN $query");
}