mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-09 12:02:24 +09:00
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:
parent
e9dca90031
commit
4b85afd9b3
3 changed files with 6 additions and 6 deletions
|
|
@ -178,7 +178,8 @@
|
||||||
foreach($this->tables as $table){
|
foreach($this->tables as $table){
|
||||||
if($table->isJoinTable() || !$simple_table_count) $from .= $table->toString($with_values) . ' ';
|
if($table->isJoinTable() || !$simple_table_count) $from .= $table->toString($with_values) . ' ';
|
||||||
else $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++;
|
$simple_table_count++;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function toString(){
|
function toString(){
|
||||||
return $this->name;
|
//return $this->name;
|
||||||
//return sprintf("%s%s", $this->name, $this->alias ? ' as ' . $this->alias : '');
|
return sprintf("%s%s", $this->name, $this->alias ? ' as ' . $this->alias : '');
|
||||||
}
|
}
|
||||||
|
|
||||||
function getName(){
|
function getName(){
|
||||||
|
|
@ -23,8 +23,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function isJoinTable(){
|
function isJoinTable(){
|
||||||
if(in_array($tableName,array('left join','left outer join','right join','right outer join'))) return true;
|
return false;
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@
|
||||||
$value = $this->escapeValue($this->value);
|
$value = $this->escapeValue($this->value);
|
||||||
return $this->toString($value);
|
return $this->toString($value);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getUnescapedValue(){
|
function getUnescapedValue(){
|
||||||
return $this->toString($this->value);
|
return $this->toString($this->value);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue