system system.base system.caching system.caching.dependencies system.collections system.console system.db system.db.ar system.db.schema system.db.schema.mssql system.db.schema.mysql system.db.schema.oci system.db.schema.pgsql system.db.schema.sqlite system.i18n system.i18n.gettext system.logging system.utils system.validators system.web system.web.actions system.web.auth system.web.filters system.web.helpers system.web.renderers system.web.services system.web.widgets system.web.widgets.captcha system.web.widgets.pagers

CJoinQuery

system.db.ar
继承 class CJoinQuery
可用自 1.0
版本 $Id$
CJoinQuery represents a JOIN SQL statement.

公共属性

隐藏继承的属性

属性类型描述被定义在
conditions array list of WHERE clauses CJoinQuery
distinct boolean whether to select distinct result set CJoinQuery
elements array list of join element IDs (id=>true) CJoinQuery
groups array list of GROUP BY clauses CJoinQuery
havings array list of HAVING clauses CJoinQuery
joins array list of join statement CJoinQuery
limit integer row limit CJoinQuery
offset integer row offset CJoinQuery
orders array list of ORDER BY clauses CJoinQuery
params array list of query parameters CJoinQuery
selects array list of column selections CJoinQuery

公共方法

隐藏继承的方法

方法描述被定义在
__construct() Constructor. CJoinQuery
createCommand() Creates the SQL statement. CJoinQuery
join() Joins with another join element CJoinQuery

属性详情

conditions 属性
public array $conditions;

list of WHERE clauses

distinct 属性 (自版本 v1.0.9 可用)
public boolean $distinct;

whether to select distinct result set

elements 属性
public array $elements;

list of join element IDs (id=>true)

groups 属性
public array $groups;

list of GROUP BY clauses

havings 属性
public array $havings;

list of HAVING clauses

joins 属性
public array $joins;

list of join statement

limit 属性
public integer $limit;

row limit

offset 属性
public integer $offset;

row offset

orders 属性
public array $orders;

list of ORDER BY clauses

params 属性
public array $params;

list of query parameters

selects 属性
public array $selects;

list of column selections

方法详情

__construct() 方法
public void __construct(CJoinElement $joinElement, CDbCriteria $criteria=NULL)
$joinElement CJoinElement The root join tree.
$criteria CDbCriteria the query criteria

Constructor.

createCommand() 方法
public string createCommand(CDbCommandBuilder $builder)
$builder CDbCommandBuilder the command builder
{return} string the SQL statement

Creates the SQL statement.

join() 方法
public void join(CJoinElement $element)
$element CJoinElement the element to be joined

Joins with another join element