Move apply_sql_function
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@976 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
parent
e0fbf333e7
commit
e3310672d2
|
@ -359,6 +359,10 @@ function dump_csv($row) {
|
|||
echo implode(",", $row) . "\n";
|
||||
}
|
||||
|
||||
function apply_sql_function($function, $column) {
|
||||
return ($function ? ($function == "count distinct" ? "COUNT(DISTINCT " : strtoupper("$function(")) . "$column)" : $column);
|
||||
}
|
||||
|
||||
function is_email($email) {
|
||||
$atom = '[-a-z0-9!#$%&\'*+/=?^_`{|}~]'; // characters of local-name
|
||||
$domain = '[a-z0-9]([-a-z0-9]{0,61}[a-z0-9])'; // one domain component
|
||||
|
|
|
@ -16,13 +16,6 @@ foreach ($fields as $key => $field) {
|
|||
$rights += $field["privileges"];
|
||||
}
|
||||
|
||||
function apply_sql_function($function, $column) {
|
||||
return ($function
|
||||
? ($function == "count distinct" ? "COUNT(DISTINCT " : strtoupper("$function(")) . "$column)"
|
||||
: $column
|
||||
);
|
||||
}
|
||||
|
||||
list($select, $group) = $adminer->selectColumnsProcess($columns, $indexes);
|
||||
$where = $adminer->selectSearchProcess($fields, $indexes);
|
||||
$order = $adminer->selectOrderProcess($fields, $indexes);
|
||||
|
|
Loading…
Reference in a new issue