Permalink
Browse files

MINOR Fixed syntax errors from SQLQuery/DataQuery cleanup

  • Loading branch information...
chillu committed May 16, 2012
1 parent 4da9e72 commit 8f2ede8fcfc80441e655b4103dc4b4badd6cdfb8
Showing with 5 additions and 5 deletions.
  1. +4 −4 model/DataQuery.php
  2. +1 −1 model/SQLQuery.php
View
@@ -325,7 +325,7 @@ function count() {
* @param String $field Unquoted database column name (will be escaped automatically)
*/
function Max($field) {
- return $this->getFinalisedQuery()->aggregate(sprintf('MAX("%s")', Convert::raw2sql($field))->execute()->value();
+ return $this->getFinalisedQuery()->aggregate(sprintf('MAX("%s")', Convert::raw2sql($field)))->execute()->value();
}
/**
@@ -334,7 +334,7 @@ function Max($field) {
* @param String $field Unquoted database column name (will be escaped automatically)
*/
function Min($field) {
- return $this->getFinalisedQuery()->aggregate(sprintf('MIN("%s")', Convert::raw2sql($field))->execute()->value();
+ return $this->getFinalisedQuery()->aggregate(sprintf('MIN("%s")', Convert::raw2sql($field)))->execute()->value();
}
/**
@@ -343,7 +343,7 @@ function Min($field) {
* @param String $field Unquoted database column name (will be escaped automatically)
*/
function Avg($field) {
- return $this->getFinalisedQuery()->aggregate(sprintf('AVG("%s")', Convert::raw2sql($field))->execute()->value();
+ return $this->getFinalisedQuery()->aggregate(sprintf('AVG("%s")', Convert::raw2sql($field)))->execute()->value();
}
/**
@@ -352,7 +352,7 @@ function Avg($field) {
* @param String $field Unquoted database column name (will be escaped automatically)
*/
function Sum($field) {
- return $this->getFinalisedQuery()->aggregate((sprintf('SUM("%s")', Convert::raw2sql($field)))->execute()->value();
+ return $this->getFinalisedQuery()->aggregate(sprintf('SUM("%s")', Convert::raw2sql($field)))->execute()->value();
}
/**
View
@@ -848,7 +848,7 @@ function sql() {
else $filter = "(" . implode(") AND (", $join['filter']) . ")";
$aliasClause = ($alias != $join['table']) ? " AS \"" . Convert::raw2sql($alias) . "\"" : "";
- $this->from[$alias] = strtoupper($join['type']) . " JOIN \"{" . Convert::raw2sql($join['table']) . "}\"$aliasClause ON $filter";
+ $this->from[$alias] = strtoupper($join['type']) . " JOIN \"" . Convert::raw2sql($join['table']) . "\"$aliasClause ON $filter";
}
}

0 comments on commit 8f2ede8

Please sign in to comment.