From 55c494b7670020c9ee5fab6d5c8f3284bb50f5c9 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Fri, 24 May 2013 13:38:54 -0700 Subject: [PATCH] Don't use LIMIT 1 if inline updating unique row --- adminer/select.inc.php | 2 +- changes.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/adminer/select.inc.php b/adminer/select.inc.php index c9e9e565..c6eef856 100644 --- a/adminer/select.inc.php +++ b/adminer/select.inc.php @@ -149,7 +149,7 @@ if ($_POST && !$error) { } $query = table($TABLE) . " SET " . implode(", ", $set); $where2 = " WHERE " . where_check($unique_idf, $fields) . ($where ? " AND " . implode(" AND ", $where) : ""); - $result = queries("UPDATE" . ($is_group ? " $query$where2" : limit1($query, $where2))); // can change row on a different page without unique key + $result = queries("UPDATE" . ($is_group || $unselected === array() ? " $query$where2" : limit1($query, $where2))); // can change row on a different page without unique key if (!$result) { break; } diff --git a/changes.txt b/changes.txt index 6f24878a..3dd29ec7 100644 --- a/changes.txt +++ b/changes.txt @@ -1,6 +1,7 @@ Adminer 3.7.1-dev: Increase click target for checkboxes Use shadow for highlighting default button +Don't use LIMIT 1 if inline updating unique row PostgreSQL: Order table list by name PostgreSQL: Fix detecting oid column in PDO