diff --git a/plugins/edit-foreign.php b/plugins/edit-foreign.php index 0bb825a2..0b5227c6 100644 --- a/plugins/edit-foreign.php +++ b/plugins/edit-foreign.php @@ -30,7 +30,7 @@ class AdminerEditForeign { if (preg_match('~binary~', $field["type"])) { $column = "HEX($column)"; } - $options = array("" => "") + get_vals("SELECT $column FROM " . table($target) . " ORDER BY 1"); + $options = array("" => "") + get_vals("SELECT $column FROM " . table($target) . " ORDER BY 1" . ($this->_limit ? " LIMIT " . ($this->_limit + 1) : "")); if ($this->_limit && count($options) - 1 > $this->_limit) { return; }