diff --git a/adminer/select.inc.php b/adminer/select.inc.php index 4cfa74da..0d81884c 100644 --- a/adminer/select.inc.php +++ b/adminer/select.inc.php @@ -39,7 +39,12 @@ if ($_GET["val"] && is_ajax()) { header("Content-Type: text/plain; charset=utf-8"); foreach ($_GET["val"] as $unique_idf => $row) { $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, $fields) . ($where ? " AND " . implode(" AND ", $where) : "") . ($order ? " ORDER BY " . implode(", ", $order) : ""), 1)); + $select = array($as ? $as : idf_escape(key($row))); + $where[] = where_check($unique_idf, $fields); + $return = $driver->select($TABLE, $select, $where, $select, array(), 1, 0); + if ($return) { + echo reset($return->fetch_row()); + } } exit; }