Improvements for query classes.

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9102 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ucorina 2011-09-07 17:10:40 +00:00
parent f1c9668478
commit 78db12a858
6 changed files with 88 additions and 76 deletions

View file

@ -1,15 +1,15 @@
<?php
<?php
class Subquery extends Query {
var $alias;
var $join_type;
function Subquery($alias, $columns, $tables, $conditions, $groups, $orderby, $limit, $join_type = null){
$this->alias = $alias;
$this->queryID = null;
$this->action = "select";
$this->columns = $columns;
$this->tables = $tables;
$this->conditions = $conditions;
@ -18,20 +18,24 @@
$this->limit = $limit;
$this->join_type = $join_type;
}
function getAlias(){
return $this->alias;
}
function isJoinTable(){
if($this->join_type) return true;
return false;
}
function toString($with_values = true){
$oDB = &DB::getInstance();
return '(' .$oDB->getSelectSql($this, $with_values) . ')';
return '(' .$oDB->getSelectSql($this, $with_values) . ')';
}
function isSubquery(){
return true;
}
}