v5:reference:connection:createsequence
createSequence
See Also
Syntax
bool createSequence( optional string $sequenceName='adodbseq', optional int $startNumber )
Description
The function createSequence()
creates an auto-incrementing number device. If the database supports it, it uses native sequence handling routines, otherwise it emulates the functionality using a table and an auto-incrementing numbers.
Once created, numbers can retrieved using genId().
Usage
/* * Connection assumed */ /* * Create a sequence called my_sequence, using default start of 1 */ $db->createSequence('my_sequence');
v5/reference/connection/createsequence.txt · Last modified: 2016/01/17 00:45 by mnewnham