mirror of
https://github.com/vrana/adminer.git
synced 2025-08-08 07:36:44 +02:00
Added support for binary foreign keys selection on edit
This commit is contained in:
committed by
Jakub Vrana
parent
3344fae96e
commit
5f26d3a1b8
@@ -26,7 +26,11 @@ class AdminerEditForeign {
|
||||
$id = $foreignKey["target"][0];
|
||||
$options = &$values[$target][$id];
|
||||
if (!$options) {
|
||||
$options = array("" => "") + get_vals("SELECT " . idf_escape($id) . " FROM " . table($target) . " ORDER BY 1");
|
||||
$column = idf_escape($id);
|
||||
if (preg_match('~binary~', $field["type"])) {
|
||||
$column = "HEX($column)";
|
||||
}
|
||||
$options = array("" => "") + get_vals("SELECT $column FROM " . table($target) . " ORDER BY 1");
|
||||
if ($this->_limit && count($options) - 1 > $this->_limit) {
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user