API15:JDatabase/setQuery
From Joomla! Documentation
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
Code Examples