RE: [PEAR] MDB : Sequences

From: Date: Mon, 08 Dec 2003 13:38:09 +0000
Subject: RE: [PEAR] MDB : Sequences
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-9360@lists.php.net to get a copy of this message
> From: Vincent DUPONT [mailto:Vincent.dupont@ausy.be] > Sent: Monday, December 08, 2003 12:11 PM > Hi all, I have a question about MDB sequences > > When I create a sequence in a PHP script, is this sequence the same for > every session. What happen if two users (so, 2 independant sessions or > pages) request the nextId for the same sequence ? > > My understanding is that the sequence is a PHP object, not a Database > object. How can the Sequence handle the nextId accross all pages and all > users (browsers) without providing the same ID twice? Your understanding is incorrect. The sequence is either natively supported by the RDBMS or emulated with in the database. So the sequence will always give you a new id. Regards, Lukas

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