JQuery/ toString: Difference between revisions
From Joomla! Documentation
m removing red link to edit, no existant pages |
m preparing for archive only |
||
| Line 63: | Line 63: | ||
===Examples=== | ===Examples=== | ||
=== Code Examples === | |||
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=__toString | category=__toString | ||
category=JQuery | category=JQuery | ||
namespace=CodeExample | |||
category=MethodExample | category=MethodExample | ||
include=* | include=* | ||
Latest revision as of 01:02, 25 March 2017
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
Code Examples