]> git.joonet.de Git - adminer.git/commitdiff
Generalize inline edit of long fields
authorJakub Vrana <jakub@vrana.cz>
Thu, 9 Jan 2014 07:14:53 +0000 (23:14 -0800)
committerJakub Vrana <jakub@vrana.cz>
Thu, 9 Jan 2014 07:33:14 +0000 (23:33 -0800)
adminer/select.inc.php

index 4cfa74da9c459e354d749961e9398a0f76d7df78..0d81884c642c3d6b99141c2b85330f5aa2c44a0c 100644 (file)
@@ -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;
 }