Re: [Phplib-users] Add db feature ?
Brought to you by:
nhruby,
richardarcher
From: Richard A. <rh...@ju...> - 2001-08-26 21:37:33
|
At 2:45 PM +0200 26/8/01, Guillaume Desclaux wrote: >I know the function nextid($seq_name) in db class exists... but many >databases implement their own sequence mechanism (like auto_increment in >mysql, or sequence in Oracle, etc...) >So, don't you think that we should add the function insert_id() in db >class to retrieve easily the id generated by a query INSERT into table >where the table key id is auto_increment ? From my point of view, it is much easier to maintain the code if all the DB classes perform nextid() in the same manner. That said, the databases which don't support table locking must implement nextid differently. I think it is more important to implement sequences for the DB classes that are missing them (ODBC most notably, but also mssql, msql and I think some others). I plan to work on this today. And besides, if it ain't broke, don't fix it ;) ...Richard. |