Update to subquery alias.

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0-DB@8564 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ucorina 2011-07-05 16:10:36 +00:00
parent e9dca90031
commit 4b85afd9b3
3 changed files with 6 additions and 6 deletions

View file

@ -178,7 +178,8 @@
foreach($this->tables as $table){
if($table->isJoinTable() || !$simple_table_count) $from .= $table->toString($with_values) . ' ';
else $from .= ', '.$table->toString($with_values) . ' ';
if(!$table->isJoinTable()) $from .= $table->getAlias() ? ' as ' . $table->getAlias() . ' ' : ' ';
if(is_a($table, 'Subquery')) $from .= $table->getAlias() ? ' as ' . $table->getAlias() . ' ' : ' ';
$simple_table_count++;
}