diff --git a/adminer/select.inc.php b/adminer/select.inc.php index 8e1ab2ee..b0e82632 100644 --- a/adminer/select.inc.php +++ b/adminer/select.inc.php @@ -183,7 +183,7 @@ if (!$columns) { echo ""; $names = array(); reset($select); - $order = 0; + $order = 1; foreach ($rows[0] as $key => $val) { $val = $_GET["columns"][key($select)]; $field = $fields[$select ? $val["col"] : $key]; diff --git a/editor/example.php b/editor/example.php index 1a8b518e..e15807d8 100644 --- a/editor/example.php +++ b/editor/example.php @@ -29,8 +29,8 @@ function adminer_object() { } function fieldName($field, $order = 0) { - // only first five columns with comments will be displayed - return ($order < 5 ? h($field["comment"]) : ""); + // only columns with comments will be displayed and only the first five in select + return ($order <= 5 ? h($field["comment"]) : ""); } }