API16

JDatabase/setQuery

< 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

Sets the SQL query string for later execution.


<! removed transcluded page call, red link never existed >

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;
}


<! removed transcluded page call, red link never existed >

Examples

Code Examples


Advertisement