DB_common::nextId()

DB_common::nextId() -- Returns the next free id of a sequence

Synopsis

resource nextId (string $seq_name, boolean $onDemand = TRUE)

Описание

See "Intro - Sequences"

Параметр

string $seq_name

name of the sequence

boolean $onDemand

when TRUE the sequence is automatic created, if it not exists.

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

integer - a free id number or a DB_Error object on failure

Throws

Таблица 22-1. Возможные значения PEAR_Error

Error codeError messageReasonSolution
DB_ERROR_NOT_CAPABLE DB backend not capable Function is not supported by the database backend Switch to another database system, if you really need this feature.
DB_ERROR_NOT_LOCKED not locked Locking of sequence table fails Database specific, check documentation of your database,
DB_ERROR_NOSUCHTABLE no such table Sequence table was not found Try to create a new sequence or if you are sure, a sequence was already create, check database integrity

Заметка

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

Пример

См. также

"Intro - Sequences", createSequence(), dropSequence()


HIVE: All information for read only. Please respect copyright!
Hosted by hive йца: йХЕБЯЙЮЪ ЦНПНДЯЙЮЪ АХАКХНРЕЙЮ