Actions

API15

JQuery/ toString

From Joomla! Documentation

< API15:JQuery
Revision as of 13:42, 12 May 2013 by JoomlaWikiBot (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Replacement filing cabinet.png
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

string The completed query


[<! removed edit link to red link >]

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

Syntax

__toString()


Returns

string The completed query

Defined in

libraries/joomla/database/query.php

Importing

jimport( 'joomla.database.query' );

Source Body

public function __toString()
{
        $query = '';
 
        switch ($this->_type)
        {
                case 'select':
                        $query .= $this->_select->toString();
                        $query .= $this->_from->toString();
                        if ($this->_join) {
                                // special case for joins
                                foreach ($this->_join as $join) {
                                        $query .= $join->toString();
                                }
                        }
                        if ($this->_where) {
                                $query .= $this->_where->toString();
                        }
                        if ($this->_group) {
                                $query .= $this->_group->toString();
                        }
                        if ($this->_having) {
                                $query .= $this->_having->toString();
                        }
                        if ($this->_order) {
                                $query .= $this->_order->toString();
                        }
                        break;
        }
 
        return $query;
}

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

Examples

<CodeExamplesForm />