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:
jakubvrana 2009-08-18 09:16:04 +00:00
parent 2b3bb44b00
commit e0fbf333e7
2 changed files with 2 additions and 2 deletions

View file

@ -1,7 +1,7 @@
<?php
class Adminer {
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");
/** Name in title and navigation

View file

@ -18,7 +18,7 @@ foreach ($fields as $key => $field) {
function apply_sql_function($function, $column) {
return ($function
? ($function == "distinct" ? "COUNT(DISTINCT " : strtoupper("$function(")) . "$column)"
? ($function == "count distinct" ? "COUNT(DISTINCT " : strtoupper("$function(")) . "$column)"
: $column
);
}