API16:JDatabaseQuery/clear
From Joomla! Documentation
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.
Contents |
Description
Clear data from the query or a specific clause of the query.
[<! removed edit link to red link >]
<! removed transcluded page call, red link never existed >
Syntax
clear($clause=null)
| Parameter Name | Default Value | Description |
|---|---|---|
| $clause | null | Optionally, the name of the clause to clear, or nothing to clear the whole query. |
Defined in
libraries/joomla/database/databasequery.php
Importing
jimport( 'joomla.database.databasequery' );
Source Body
public function clear($clause = null) { switch ($clause) { case 'select': $this->_select = null; $this->_type = null; break; case 'delete': $this->_delete = null; $this->_type = null; break; case 'update': $this->_update = null; $this->_type = null; break; case 'insert': $this->_insert = null; $this->_type = null; break; case 'from': $this->_from = null; break; case 'join': $this->_join = null; break; case 'set': $this->_set = null; break; case 'where': $this->_where = null; break; case 'group': $this->_group = null; break; case 'having': $this->_having = null; break; case 'order': $this->_order = null; break; default: $this->_type = null; $this->_select = null; $this->_delete = null; $this->_udpate = null; $this->_insert = null; $this->_from = null; $this->_join = null; $this->_set = null; $this->_where = null; $this->_group = null; $this->_having = null; $this->_order = null; break; } return $this; }
[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >
Examples
<CodeExamplesForm />
