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

@@ -31,7 +31,9 @@ if ($_POST && !$error && !isset($_GET["select"])) {
}
query_redirect("UPDATE" . limit1(table($TABLE) . " SET" . implode(",", $set) . "\nWHERE $where"), $location, lang('Item has been updated.'));
} else {
queries_redirect($location, lang('Item has been inserted.'), insert_into($TABLE, $set));
$result = insert_into($TABLE, $set);
$last_id = ($result ? last_id() : 0);
queries_redirect($location, lang('Item%s has been inserted.', ($last_id ? " $last_id" : "")), $result); //! link
}
}
}