JDatabase/setQuery
From Joomla! Documentation
< API16:JDatabase
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]
Sets the SQL query string for later execution.
<! removed transcluded page call, red link never existed >
Syntax[edit]
setQuery($query, $offset=0, $limit=0)
Parameter Name | Default Value | Description |
---|---|---|
$query | The SQL query. | |
$offset | 0 | The offset to start selection. |
$limit | 0 | The number of results to return. |
Returns[edit]
object This object to support chaining.
Defined in[edit]
libraries/joomla/database/database.php
Importing[edit]
jimport( 'joomla.database.database' );
Source Body[edit]
public function setQuery($query, $offset = 0, $limit = 0)
{
$this->_sql = $query;
$this->_limit = (int) $limit;
$this->_offset = (int) $offset;
return $this;
}
<! removed transcluded page call, red link never existed >
Examples[edit]
Code Examples[edit]