1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-27 08:14:35 +02:00

Respect numbers in autocomplete

This commit is contained in:
Jakub Vrana
2011-05-05 07:46:36 +02:00
parent dd295df9bd
commit 24e66c2812
3 changed files with 9 additions and 8 deletions

View File

@@ -572,10 +572,10 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5
$return = &$this->_values[$table];
if (!isset($return)) {
$table_status = table_status($table);
$return = ($table_status["Rows"] > 1000
? (isset($value) ? $connection->result("SELECT $name FROM " . table($table) . " WHERE $id = " . q($value)) : "")
: array("" => "") + get_key_vals("SELECT $id, $name FROM " . table($table) . " ORDER BY 2")
);
$return = ($table_status["Rows"] > 1000 ? "" : array("" => "") + get_key_vals("SELECT $id, $name FROM " . table($table) . " ORDER BY 2"));
}
if (!$return && isset($value)) {
return $connection->result("SELECT $name FROM " . table($table) . " WHERE $id = " . q($value));
}
return $return;
}