MDB_Common::nextId()

MDB_Common::nextId() -- returns the next free id of a sequence

Synopsis

require_once 'MDB.php';

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

Описание

See "Introduction - Sequences"

Параметр

string $seq_name

name of the sequence

boolean $onDemand

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

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

resource - a free id or a MDB_Error, if fail

Throws

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

Error codeError messageReasonSolution
MDB_ERROR_NOT_CAPABLE NULL Function is not supported by the database backend Switch to another database system, if you really need this feature.
MDB_ERROR_NOT_LOCKED NULL Locking of sequence table fails Database specific, check documention of your database,
MDB_ERROR_NOSUCHTABLE NULL Sequence table was not found Try to create a new sequence or if you are sure, a sequence was already create, check database integrity

Заметка

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

См. также

createSequence() , dropSequence()


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