PEAR DB nextId() sequences

From: Date: Thu, 04 May 2006 19:48:06 +0000
Subject: PEAR DB nextId() sequences
Groups: php.general 
Request: Send a blank email to php-general+get-235563@lists.php.net to get a copy of this message
Hey guys, Just had a quick question for anyone out there. I've been using PEAR's DB object for quite a while, as I have to simultaneously work with both MySQL and PostgreSQL. Currently I use the nextID() method to find new IDs for the rows that I insert, but am running into an issue with its sequence tables. The fact that it generates a table for every corresponding sequence is becoming unbearable, as it is seriously cluttering my databases. I was wondering if anyone knew of a PEAR hack out there that might push all of these sequences into a single table that has the sequence name as a second row. I'm on the verge of doing this myself, but am hoping for a better solution, as I would rather not have to break PEAR. Any thoughts on how others have tackled this issue ? It just seems silly to me that they did not make the sequences behave in a nicer way when they designed this system. I would much rather see something like a pear_sequences table then an extra 4 dozen tables. Thanks. ~Drew

« previous php.general (#235563) next »