]> git.joonet.de Git - adminer.git/commitdiff
MySQL: Unsupport hex function
authorJakub Vrana <jakub@vrana.cz>
Sun, 9 Sep 2012 05:39:15 +0000 (22:39 -0700)
committerJakub Vrana <jakub@vrana.cz>
Sun, 9 Sep 2012 05:39:52 +0000 (22:39 -0700)
adminer/drivers/mysql.inc.php
adminer/include/adminer.inc.php
adminer/select.inc.php

index 20a1558e91cd6aaa3876f18813ceb78d0f6a18ba..698c7959fecf1672b41578c57d470fe455028408 100644 (file)
@@ -970,12 +970,12 @@ if (!defined("DRIVER")) {
        }
        $unsigned = array("unsigned", "zerofill", "unsigned zerofill"); ///< @var array number variants
        $operators = array("=", "<", ">", "<=", ">=", "!=", "LIKE", "LIKE %%", "REGEXP", "IN", "IS NULL", "NOT LIKE", "NOT REGEXP", "NOT IN", "IS NOT NULL", ""); ///< @var array operators used in select
-       $functions = array("char_length", "date", "from_unixtime", "hex", "lower", "round", "sec_to_time", "time_to_sec", "upper"); ///< @var array functions used in select
+       $functions = array("char_length", "date", "from_unixtime", "lower", "round", "sec_to_time", "time_to_sec", "upper"); ///< @var array functions used in select
        $grouping = array("avg", "count", "count distinct", "group_concat", "max", "min", "sum"); ///< @var array grouping functions used in select
        $edit_functions = array( ///< @var array of array("$type|$type2" => "$function/$function2") functions used in editing, [0] - edit and insert, [1] - edit only
                array(
                        "char" => "md5/sha1/password/encrypt/uuid", //! JavaScript for disabling maxlength
-                       "binary" => "md5/sha1/hex",
+                       "binary" => "md5/sha1",
                        "date|time" => "now",
                ), array(
                        "int|float|double|decimal" => "+/-",
index aa8d3b4f40b69b17b0e8c3771f4a02f509264a73..ce78f857605c0ae34a2f5280bacaed723cb34348 100644 (file)
@@ -543,7 +543,7 @@ username.form['auth[driver]'].onchange();
                        $return = idf_escape($name) . " $function " . (preg_match("~^(\\d+|'[0-9.: -]') [A-Z_]+$~i", $value) ? $value : $return);
                } elseif (ereg('^(addtime|subtime|concat)$', $function)) {
                        $return = "$function(" . idf_escape($name) . ", $return)";
-               } elseif (ereg('^(md5|sha1|password|encrypt|hex)$', $function)) {
+               } elseif (ereg('^(md5|sha1|password|encrypt)$', $function)) {
                        $return = "$function($return)";
                }
                if (ereg("binary", $field["type"])) {
index 3e448941d44c55a0f2e169165b4e2d1af414a455..386ee9bed4237f771033d9d2054fb9dca300a3e5 100644 (file)
@@ -30,7 +30,7 @@ $is_group = count($group) < count($select);
 $where = $adminer->selectSearchProcess($fields, $indexes);
 $order = $adminer->selectOrderProcess($fields, $indexes);
 $limit = $adminer->selectLimitProcess();
-$from = ($select ? implode(", ", $select) : "*" . ($oid ? ", $oid" : "")) . "\nFROM " . table($TABLE);
+$from = ($select ? implode(", ", $select) : ($oid ? "$oid, " : "") . "*") . "\nFROM " . table($TABLE);
 $group_by = ($group && $is_group ? "\nGROUP BY " . implode(", ", $group) : "") . ($order ? "\nORDER BY " . implode(", ", $order) : "");
 
 if ($_GET["val"] && is_ajax()) {