Subclass of tgcSqlBuilder that helps to create DELETE sql-statements.
Subclass of tgcSqlBuilder that helps to create DELETE sql-statements.
Located in /tgcSqlBuilder/Delete.php (line 22)
tgcSqlBuilder | --tgcSqlBuilder_Delete
Constructor
Constructor
Add an ORDER BY setting.
Add an ORDER BY setting. The parameter $direction can be either SQLBUILDER_ORDER_ASC or SQLBUILDER_ORDER_DESC. If none is specified, then SQLBUILDER_ORDER_ASC will be used. You can also leave $column null, if you want to order by an alias.
1 $sql = new tgcSqlBuilder_Delete($dbc);
2
3 // ... ORDER BY alias1 ASC ...
4 $sql->addOrderBy('alias1');
5
6 // ... ORDER BY alias2 DESC ...
7 $sql->addOrderBy('alias2', null, SQLBUILDER_ORDER_DESC);
If a setting for this table/column exists, it will be overwritten.
Add a raw WHERE statement.
Add a raw WHERE statement. You can add a raw WHERE statement and define a logical operator. As default this is the logical AND.
Add the statements table.
Add the statements table. If you call this method twice, the tablename that was set in first call will be overwritten.
1 $sql = new tgcSqlBuilder_Delete($dbc);
2 $sql->addTable('users');
3
Add a WHERE statement.
Add a WHERE statement. Possible comparison operators are: SQLBUILDER_COMP_EQUAL, SQLBUILDER_COMP_NOT_EQUAL, SQLBUILDER_COMP_LESSER_THAN, SQLBUILDER_COMP_LESSER_EQUAL, SQLBUILDER_COMP_GREATER_EQUAL, SQLBUILDER_COMP_GREATER_THAN, SQLBUILDER_COMP_STARTSWITH, SQLBUILDER_COMP_CONTAINS, SQLBUILDER_COMP_ENDSWITH, SQLBUILDER_COMP_BETWEEN If none is specified then SQLBUILDER_COMP_EQUAL will be used. Possible logical expressions are: SQLBUILDER_LOGICAL_AND, SQLBUILDER_LOGICAL_OR If none is specified, then SQLBUILDER_LOGICAL_AND will be used. When you are using SQLBUILDER_COMP_BETWEEN, then specify $values as a numerical array with two values in correct order.
Generate the sql-statement.
Generate the sql-statement. This method generates a query based on the object-information and returns it as a string.
1 $sql = new tgcSqlBuilder_Delete($dbc);
2 $query = $sql->generateQuery();
Remove an ORDER BY setting.
Remove an ORDER BY setting. If you don't specify any parameter, then all ORDER BY information will be removed. If you specify a tablename and a columnname, then this specific ORDER BY setting will be removed.
Remove the raw WHERE statements, that have been stored so far.
Remove the raw WHERE statements, that have been stored so far.
Remove the tablename.
Remove the tablename.
Remove a WHERE statement.
Remove a WHERE statement. If you don't specify any parameter, then all WHERE information will be removed. If you specify a tablename and a columnname, then this specific ORDER BY setting will be removed.
Reset the object's whole information.
Reset the object's whole information.
Set the LIMIT for the sql-statement.
Set the LIMIT for the sql-statement.
Remove the LIMIT for the sql-statement.
Remove the LIMIT for the sql-statement.
Inherited From tgcSqlBuilder
tgcSqlBuilder::tgcSqlBuilder()
tgcSqlBuilder::addTable()
tgcSqlBuilder::escape()
tgcSqlBuilder::generateQuery()
tgcSqlBuilder::removeTable()
tgcSqlBuilder::reset()
Documentation generated on Fri, 19 Nov 2004 23:54:02 +0100 by phpDocumentor 1.2.3