DB_common::getRow() (Previous) (Next) DB_common::nextId()

Last updated: Sun, 16 May 2004

DB_common::limitQuery()

DB_common::limitQuery() -- Sends a LIMIT query to the database

Описание

Executes a SQL query, but fetches only the the specificed count of rows. It is an emulation of the MySQL LIMIT option.

Параметр

string $query

the SQL query

integer $from

the row to start to fetch

integer $count

the numbers of rows to fetch

mixed $params

array, string or numeric data to be added to the prepared statement. Quantity of items passed must match quantity of placeholders in the prepared statement: meaning 1 placeholder for non-array parameters or 1 placeholder per array element.

Возвращаемое значение

mixed - a new DB_result object for queries that return results (such as SELECT queries), DB_OK for queries that manipulate data (such as INSERT queries) or a DB_Error object on failure

Заметка

Эта функция не должна вызываться статически.

Depending on the database you will not really get more speed compared to query(). The advantage of limitQuery() is the deleting of unneeded rows in the resultset, as early as possible. So this can decrease memory usage.

См. также

query()

DB_common::getRow() (Previous) (Next) DB_common::nextId()

Download Documentation Last updated: Sun, 16 May 2004
Hosting
HIVE: All information for read only. Please respect copyright!
Hosted by hive йца: йХЕБЯЙЮЪ ЦНПНДЯЙЮЪ АХАКХНРЕЙЮ