Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Move apply_sql_function

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@976 7c3ca157-0c34-0410-bff1-cbf682f78f5c
  • Loading branch information...
commit e3310672d209734889e8adafe16f86a44a7836d8 1 parent e0fbf33
jakubvrana authored
Showing with 4 additions and 7 deletions.
  1. +4 −0 adminer/include/functions.inc.php
  2. +0 −7 adminer/select.inc.php
View
4 adminer/include/functions.inc.php
@@ -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
View
7 adminer/select.inc.php
@@ -16,13 +16,6 @@
$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);
Please sign in to comment.
Something went wrong with that request. Please try again.