Skip to content

Commit

Permalink
MINOR SQLQuery without a FROM table should return empty query
Browse files Browse the repository at this point in the history
  • Loading branch information
Stig Lindqvist committed Sep 26, 2011
1 parent 37d197c commit 4171015
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions model/SQLQuery.php
Expand Up @@ -458,6 +458,10 @@ function sql() {
// TODO: Don't require this internal-state manipulate-and-preserve - let sqlQueryToString() handle the new syntax // TODO: Don't require this internal-state manipulate-and-preserve - let sqlQueryToString() handle the new syntax
$origFrom = $this->from; $origFrom = $this->from;


if(!$this->from) {
return '';
}

// Build from clauses // Build from clauses
foreach($this->from as $alias => $join) { foreach($this->from as $alias => $join) {
// $join can be something like this array structure // $join can be something like this array structure
Expand Down

0 comments on commit 4171015

Please sign in to comment.