You are here

function DB_pgsql::modifyLimitQuery in Flickr API 5

Adds LIMIT clauses to a query string according to current DBMS standards

@access protected

Parameters

string $query the query to modify:

int $from the row to start to fetching (0 = the first row):

int $count the numbers of rows to fetch:

mixed $params array, string or numeric data to be used in: execution of the statement. Quantity of items passed must match quantity of placeholders in query: meaning 1 placeholder for non-array parameters or 1 placeholder per array element.

Return value

string the query string with LIMIT clauses added

Overrides DB_common::modifyLimitQuery

File

phpFlickr/PEAR/DB/pgsql.php, line 758

Class

DB_pgsql
The methods PEAR DB uses to interact with PHP's pgsql extension for interacting with PostgreSQL databases

Code

function modifyLimitQuery($query, $from, $count, $params = array()) {
  return "{$query} LIMIT {$count} OFFSET {$from}";
}