1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-24 15:12:51 +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

@@ -409,6 +409,11 @@ WHERE OBJECT_NAME(indexes.object_id) = " . $connection2->quote($table)
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 SCOPE_IDENTITY()"); // @@IDENTITY can return trigger INSERT
}
function explain($connection, $query) {
$connection->query("SET SHOWPLAN_ALL ON");
$return = $connection->query($query);