1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-29 01:00:07 +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

@@ -769,6 +769,14 @@ if (!defined("DRIVER")) {
return queries("INSERT INTO " . table($table) . " (" . implode(", ", array_keys($set)) . ")\nVALUES (" . implode(", ", $set) . ")");
}
/** Get last auto increment ID
* @return string
*/
function last_id() {
global $connection;
return $connection->result("SELECT LAST_INSERT_ID()"); // mysql_insert_id() truncates bigint
}
/** Explain select
* @param Min_DB
* @param string