API16:JDatabaseQuery/clear
From Joomla! Documentation
Description
Clear data from the query or a specific clause of the query.
<! 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 transcluded page call, red link never existed >
Examples
Code Examples