API15: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.
[<! removed edit link to red link >]
<! removed transcluded page call, red link never existed >
Syntax
setQuery($sql, $offset=0, $limit=0, $prefix='#__')
| Parameter Name | Default Value | Description |
|---|---|---|
| $sql | The SQL query | |
| $offset | 0 | The offset to start selection |
| $limit | 0 | The number of results to return |
| $prefix | '#__' | The common table prefix |
Defined in
libraries/joomla/database/database.php
Importing
jimport( 'joomla.database.database' );
Source Body
function setQuery( $sql, $offset = 0, $limit = 0, $prefix='#__' ) { $this->_sql = $this->replacePrefix( $sql, $prefix ); $this->_limit = (int) $limit; $this->_offset = (int) $offset; }
[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >
Examples
<CodeExamplesForm />
