Re: PEAR DB Sequences
| From: | Jeff Busby | Date: | Tue, 22 Oct 2002 16:09:06 +0000 |
| Subject: | Re: PEAR DB Sequences | ||
| References: | 1 2 3 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-2531@lists.php.net to get a copy of this message | ||
I think i missed the first part of this thread, but can you tell me why it
would be benefitial to let PEAR::DB create the sequence rather than set to
the field itself to autoincrement?
Cheers,
Jeff.
----- Original Message -----
From: "Arnaud Limbourg" <arnaud.limbourg@club-internet.fr>
To: "Don Seiler" <don@seiler.us>
Cc: <pear-general@lists.php.net>
Sent: Saturday, October 19, 2002 7:37 AM
Subject: Re: [PEAR] PEAR DB Sequences
| > I think you make perfect sense.
| >
| > So when I create the table I just set the id field as an unsigned int
and
| > define it as the primary key, but make no reference to incrementation or
| > sequences. I then setup the sequence via the PEAR DB Sequence
operation,
| > one sequence for each table that needs one?
|
| Exactly. Though i'd think it a good way to let pear::db handles that.
|
| I just do a
|
| $db->nextId('myseq');
|
| and let pear::db create it ;))
|
| Otherwise there is one table per sequence, you're correct.
|
| > Please correct me if I'm mistaken.
| >
| > That is VERY nice.
| >
| > Thanks!
| > Don.
|
| --
| PEAR General Mailing List (http://pear.php.net/)
| To unsubscribe, visit: http://www.php.net/unsub.php
|
|