From 9bfab6a3e3e674e383d8a89bbd17ccbb50aad8dc Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Sun, 9 Sep 2012 16:25:25 -0700 Subject: [PATCH] Convert fields in inline edit --- adminer/select.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/adminer/select.inc.php b/adminer/select.inc.php index e8b28c10..28ed2d01 100644 --- a/adminer/select.inc.php +++ b/adminer/select.inc.php @@ -45,7 +45,8 @@ $group_by = ($group && $is_group ? "\nGROUP BY " . implode(", ", $group) : "") . if ($_GET["val"] && is_ajax()) { header("Content-Type: text/plain; charset=utf-8"); foreach ($_GET["val"] as $unique_idf => $row) { - echo $connection->result("SELECT" . limit(idf_escape(key($row)) . " FROM " . table($TABLE), " WHERE " . where_check($unique_idf) . ($where ? " AND " . implode(" AND ", $where) : "") . ($order ? " ORDER BY " . implode(", ", $order) : ""), 1)); + $as = convert_field($fields[key($row)]); + echo $connection->result("SELECT" . limit(($as ? $as : idf_escape(key($row))) . " FROM " . table($TABLE), " WHERE " . where_check($unique_idf) . ($where ? " AND " . implode(" AND ", $where) : "") . ($order ? " ORDER BY " . implode(", ", $order) : ""), 1)); } exit; }