API16:JDatabase/setQuery
From Joomla! Documentation
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
Sets the SQL query string for later execution.
Description:JDatabase/setQuery
Syntax
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
object This object to support chaining.
Defined in
libraries/joomla/database/database.php
Importing
jimport( 'joomla.database.database' );
Source Body
public function setQuery($query, $offset = 0, $limit = 0) { $this->_sql = $query; $this->_limit = (int) $limit; $this->_offset = (int) $offset; return $this; }
[Edit See Also] SeeAlso:JDatabase/setQuery
Examples
<CodeExamplesForm />
