API16

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...)
 
m (removing red link to edit, no existant pages)
Line 3: Line 3:
  
 
<span class="editsection" style="font-size:76%;">
 
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[Description:JDatabaseQuery/clear|Edit Descripton]]<nowiki>]</nowiki>
+
<nowiki>[<! removed edit link to red link >]</nowiki>
 
</span>
 
</span>
  
{{Description:JDatabaseQuery/clear}}
+
<! removed transcluded page call, red link never existed >
  
 
===Syntax===
 
===Syntax===
Line 90: Line 90:
  
 
<span class="editsection" style="font-size:76%;">
 
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[SeeAlso:JDatabaseQuery/clear|Edit See Also]]<nowiki>]</nowiki>
+
<nowiki>[<! removed edit link to red link >]</nowiki>
 
</span>
 
</span>
{{SeeAlso:JDatabaseQuery/clear}}
+
<! removed transcluded page call, red link never existed >
  
 
===Examples===
 
===Examples===
Line 105: Line 105:
 
  format= ,,,
 
  format= ,,,
 
</dpl>
 
</dpl>
 +
[[Category:Archived pages API16]]

Revision as of 22:02, 12 May 2013

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.

[<! removed edit link to red link >]

<! removed transcluded page call, red link never existed >

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;
}

[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >

Examples[edit]

<CodeExamplesForm />