Re: PEAR DB Sequences

From: Date: Tue, 22 Oct 2002 16:14:23 +0000
Subject: Re: PEAR DB Sequences
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-2532@lists.php.net to get a copy of this message
How do you propose setting it? Is there standard syntax? I need to be able to do this for any database (mysql/postgres/oracle/etc) that the user might want to use. Don. On Tue, 22 Oct 2002, Jeff Busby wrote: > 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 > | > | > > >

« previous php.pear.general (#2532) next »