DB::nextId() question

From: Date: Thu, 14 Nov 2002 14:27:18 +0000
Subject: DB::nextId() question
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-2721@lists.php.net to get a copy of this message
Hallo, how does/should the DB::nextID() work? Does it return the free next ID of the sequence AND increase the sequence, or does it just return the ID? The latter case seems illogical, as two users could have the same ID, and simultaneously assume it is free, but only one would really have it free. Whereas with the first case, when the ID is returned, it stays free for ever, and the user can without problems execute INSERT INTO ... (ID,...) values (lastID,...). The documentation is not clear about that - it says "returns next free ID", but is this really guaranteed? Thank you for your answer! Drago

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