Re: PEAR DB Sequences
| From: | Arnaud Limbourg | Date: | Fri, 18 Oct 2002 20:25:00 +0000 |
| Subject: | Re: PEAR DB Sequences | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-2525@lists.php.net to get a copy of this message | ||
Hello,
When you first use a sequence PEAR::DB creates it in the DB, so you don't *have* to create it
beforehand, you can though, in which case it has to be of the form 'sequencename_seq'
without the quotes and if you left the default values. You can change the format of the string used
to create the sequence to match your own preferences.
If you create it you must not set it to autoincrement but better to INT unsigned.
If I'm not clear do not hesitate to ask again ;)
Arnaud.
> I'm a bit confused by sequences. Does the name you use for a sequence
> need to be that of a sequence you've created on the database? My concern
> is I don't know of a way to explicitly create a sequence in mysql.
>
> Also I'm assuming that if I use PEAR DB I shouldn't specify
> "auto_increment" in my create table syntax.
>
> Don.