Rename distinct to count distinct
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@975 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
parent
2b3bb44b00
commit
e0fbf333e7
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
class Adminer {
|
class Adminer {
|
||||||
var $functions = array("char_length", "from_unixtime", "hex", "lower", "round", "sec_to_time", "time_to_sec", "unix_timestamp", "upper");
|
var $functions = array("char_length", "from_unixtime", "hex", "lower", "round", "sec_to_time", "time_to_sec", "unix_timestamp", "upper");
|
||||||
var $grouping = array("avg", "count", "distinct", "group_concat", "max", "min", "sum"); // distinct is short for COUNT(DISTINCT)
|
var $grouping = array("avg", "count", "count distinct", "group_concat", "max", "min", "sum");
|
||||||
var $operators = array("=", "<", ">", "<=", ">=", "!=", "LIKE", "REGEXP", "IN", "IS NULL", "NOT LIKE", "NOT REGEXP", "NOT IN", "IS NOT NULL");
|
var $operators = array("=", "<", ">", "<=", ">=", "!=", "LIKE", "REGEXP", "IN", "IS NULL", "NOT LIKE", "NOT REGEXP", "NOT IN", "IS NOT NULL");
|
||||||
|
|
||||||
/** Name in title and navigation
|
/** Name in title and navigation
|
||||||
|
|
|
@ -18,7 +18,7 @@ foreach ($fields as $key => $field) {
|
||||||
|
|
||||||
function apply_sql_function($function, $column) {
|
function apply_sql_function($function, $column) {
|
||||||
return ($function
|
return ($function
|
||||||
? ($function == "distinct" ? "COUNT(DISTINCT " : strtoupper("$function(")) . "$column)"
|
? ($function == "count distinct" ? "COUNT(DISTINCT " : strtoupper("$function(")) . "$column)"
|
||||||
: $column
|
: $column
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue