mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 18:21:39 +09:00
Subquery fix.
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9858 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
99e196cd48
commit
7ee45e57c7
1 changed files with 6 additions and 3 deletions
|
|
@ -28,7 +28,10 @@ class QueryTag {
|
|||
$this->query = $query;
|
||||
$this->isSubQuery = $isSubQuery;
|
||||
if($this->isSubQuery) $this->action = 'select';
|
||||
$this->alias = $query->attrs->alias;
|
||||
if($query->attrs->alias){
|
||||
$dbParser = DB::getParser();
|
||||
$this->alias = $dbParser->escape($query->attrs->alias);
|
||||
}
|
||||
$this->join_type = $query->attrs->join_type;
|
||||
|
||||
$this->getColumns();
|
||||
|
|
@ -48,7 +51,7 @@ class QueryTag {
|
|||
function getQueryId(){
|
||||
return $this->query->attrs->query_id ? $this->query->attrs->query_id : $this->query->attrs->id;
|
||||
}
|
||||
|
||||
|
||||
function getPriority(){
|
||||
return $this->query->attrs->priority;
|
||||
}
|
||||
|
|
@ -112,7 +115,7 @@ class QueryTag {
|
|||
$buff = '';
|
||||
if($this->isSubQuery){
|
||||
$buff = 'new Subquery(';
|
||||
$buff .= "'\"" . $this->alias . '"\', ';
|
||||
$buff .= "'" . $this->alias . '\', ';
|
||||
$buff .= ($this->columns ? $this->columns->toString() : 'null' ). ', '.PHP_EOL;
|
||||
$buff .= $this->tables->toString() .','.PHP_EOL;
|
||||
$buff .= $this->conditions->toString() .',' .PHP_EOL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue