When using PEAR MDB2's sequence methods, we strongly advise using
these methods for all procedures, including the creation of the
sequences. Do not use PEAR MDB2's methods to access
sequences that were created directly in the DBMS.
If you have a compelling reason to ignore this advice, be aware
that the $seq_name argument given to all of
PEAR MDB2's sequence methods are modified before MDB2 calls the
underlying DBMS.
$seq_name is passed through PHP's
sprintf() function using the value from the
seqname_format option as
sprintf()'s format argument.
The default seqname_format is
%s_seq. So, for example, if you use
person_id_sequence as the
$seq_name, PEAR MDB2 will change that
name to person_id_sequence_seq when
querying the DBMS about creating/accessing/updating the sequence.
Also note that the default table layout for sequences emulated in PEAR DB
is slightly different in PEAR MDB2. Where PEAR DB calls the column "id" PEAR
MDB2 instead calls it "sequence" to make its purpose more clear.
For backward compatibility this can be controlled via the
seqcol_name option.
The seqname_format and seqcol_name
can be modified when connecting or via
setOption().
|