mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR SQLQuery without a FROM table should return empty query
This commit is contained in:
parent
37d197c52f
commit
4171015df1
@ -458,6 +458,10 @@ class SQLQuery {
|
||||
// TODO: Don't require this internal-state manipulate-and-preserve - let sqlQueryToString() handle the new syntax
|
||||
$origFrom = $this->from;
|
||||
|
||||
if(!$this->from) {
|
||||
return '';
|
||||
}
|
||||
|
||||
// Build from clauses
|
||||
foreach($this->from as $alias => $join) {
|
||||
// $join can be something like this array structure
|
||||
|
Loading…
Reference in New Issue
Block a user