Class CMysqlCommandBuilder
CMysqlCommandBuilder provides basic methods to create query commands for
tables.
-
CComponent
-
CDbCommandBuilder
-
CMysqlCommandBuilder
Methods summary
public
string
|
#
applyJoin( string $sql, string $join )
Alters the SQL to apply JOIN clause. This method handles the mysql specific
syntax where JOIN has to come before SET in UPDATE statement and for DELETE
where JOIN has to be after FROM part.
Alters the SQL to apply JOIN clause. This method handles the mysql specific
syntax where JOIN has to come before SET in UPDATE statement and for DELETE
where JOIN has to be after FROM part.
Parameters
- $sql
string $sql the SQL statement to be altered
- $join
string $join the JOIN clause (starting with join type, such as INNER JOIN)
Returns
string the altered SQL statement
Overrides
|
public
string
|
#
applyLimit( string $sql, integer $limit, integer $offset )
Alters the SQL to apply LIMIT and OFFSET.
Alters the SQL to apply LIMIT and OFFSET.
Parameters
- $sql
string $sql SQL query string without LIMIT and OFFSET.
- $limit
integer $limit maximum number of rows, -1 to ignore limit.
- $offset
integer $offset row offset, -1 to ignore offset.
Returns
string SQL with LIMIT and OFFSET
Overrides
|
Methods inherited from CDbCommandBuilder
__construct(),
applyCondition(),
applyGroup(),
applyHaving(),
applyOrder(),
bindValues(),
composeMultipleInsertCommand(),
createColumnCriteria(),
createCompositeInCondition(),
createCountCommand(),
createCriteria(),
createDeleteCommand(),
createFindCommand(),
createInCondition(),
createInsertCommand(),
createMultipleInsertCommand(),
createPkCondition(),
createPkCriteria(),
createSearchCondition(),
createSqlCommand(),
createUpdateCommand(),
createUpdateCounterCommand(),
ensureTable(),
getDbConnection(),
getIntegerPrimaryKeyDefaultValue(),
getLastInsertID(),
getSchema()
|
Methods inherited from CComponent
__call(),
__get(),
__isset(),
__set(),
__unset(),
asa(),
attachBehavior(),
attachBehaviors(),
attachEventHandler(),
canGetProperty(),
canSetProperty(),
detachBehavior(),
detachBehaviors(),
detachEventHandler(),
disableBehavior(),
disableBehaviors(),
enableBehavior(),
enableBehaviors(),
evaluateExpression(),
getEventHandlers(),
hasEvent(),
hasEventHandler(),
hasProperty(),
raiseEvent()
|