Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Display assigned auto_increment after clone

  • Loading branch information...
commit f1153aa35a0797159bc8c8c52195c0c955f8aa52 1 parent 5e4b815
@vrana authored
Showing with 10 additions and 2 deletions.
  1. +9 −2 adminer/select.inc.php
  2. +1 −0  changes.txt
View
11 adminer/select.inc.php
@@ -106,7 +106,7 @@
$query = "INTO $query";
}
if ($_POST["all"] || ($unselected === array() && $_POST["check"]) || count($group) < count($select)) {
- $result = queries($command . " $query" . ($_POST["all"] ? ($where ? "\nWHERE " . implode(" AND ", $where) : "") : "\nWHERE $where_check"));
+ $result = queries("$command $query" . ($_POST["all"] ? ($where ? "\nWHERE " . implode(" AND ", $where) : "") : "\nWHERE $where_check"));
$affected = $connection->affected_rows;
} else {
foreach ((array) $_POST["check"] as $val) {
@@ -119,7 +119,14 @@
}
}
}
- queries_redirect(remove_from_uri("page"), lang('%d item(s) have been affected.', $affected), $result);
+ $message = lang('%d item(s) have been affected.', $affected);
+ if ($_POST["clone"] && $result && $affected == 1) {
+ $last_id = last_id();
+ if ($last_id) {
+ $message = lang('Item%s has been inserted.', " $last_id");
+ }
+ }
+ queries_redirect(remove_from_uri("page"), $message, $result);
//! display edit page in case of an error
} elseif (!$_POST["import"]) { // modify
if (!$_POST["val"]) {
View
1  changes.txt
@@ -1,4 +1,5 @@
Adminer 3.4.1-dev:
+Display assigned auto_increment after clone
SQLite: Full alter table
SQLite: Better editing in tables without a primary key
Please sign in to comment.
Something went wrong with that request. Please try again.