Skip to content
Browse files

MySQL: Unsupport hex function

  • Loading branch information...
1 parent aff4d7d commit 31a608e398a2647baba447abe7245dd06b3cc880 @vrana committed Sep 8, 2012
Showing with 4 additions and 4 deletions.
  1. +2 −2 adminer/drivers/mysql.inc.php
  2. +1 −1 adminer/include/adminer.inc.php
  3. +1 −1 adminer/select.inc.php
View
4 adminer/drivers/mysql.inc.php
@@ -970,12 +970,12 @@ function support($feature) {
}
$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" => "+/-",
View
2 adminer/include/adminer.inc.php
@@ -543,7 +543,7 @@ function processInput($field, $value, $function = "") {
$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"])) {
View
2 adminer/select.inc.php
@@ -30,7 +30,7 @@
$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()) {

0 comments on commit 31a608e

Please sign in to comment.
Something went wrong with that request. Please try again.