Re: PEAR::DB sequences

From: Date: Fri, 11 May 2001 13:14:11 +0000
Subject: Re: PEAR::DB sequences
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-131@lists.php.net to get a copy of this message
Thomas Hurst wrote: > > Hi > > I read somewhere that sequences should be used to replace MySQL > auto_increment fields etc, but documentation is poor at best atm. From: http://marc.theaimsgroup.com/?l=pear-dev&m=98631148722852&w=2 [..] $id = $db->nextID('myTable'); $res = $db->query("INSERT INTO myTable (id,text) VALUES ($id,'foo')"); PEAR will generate a myTable_seq table for you that handles the sequences. [..] > Anyone care to shead a bit more light on using PEAR::DB on anything more > than a 4 line example? :) Here is a 301 lines Pear DB tutorial: http://vulcanonet.com/soft/pear_tut/ :) Tomas V.V.Cox

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