Difference between revisions of "JDatabaseQuery/clear"
From Joomla! Documentation
< API16:JDatabaseQuery
(New page: ===Description===
Clear data from the query or a specific clause of the query.
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[Description:JDatabaseQuery/clear|E...) |
(No difference)
|
Revision as of 17:41, 22 March 2010
The "API16" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.
Description[edit]
Clear data from the query or a specific clause of the query.
Template:Description:JDatabaseQuery/clear
Syntax[edit]
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[edit]
libraries/joomla/database/databasequery.php
Importing[edit]
jimport( 'joomla.database.databasequery' );
Source Body[edit]
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;
}
[Edit See Also] Template:SeeAlso:JDatabaseQuery/clear
Examples[edit]
<CodeExamplesForm />