Re: [Phplib-users] Add db feature ?
Brought to you by:
nhruby,
richardarcher
From: Chris J. <ch...@ch...> - 2001-09-01 01:14:15
|
I agree that sequences are more important. insert_id() is difficult to implement it reliably for all databases. I've never needed to use it for any project I've worked on, either. ..chris ----- Original Message ----- From: "Richard Archer" <rh...@ju...> At 2:45 PM +0200 26/8/01, Guillaume Desclaux wrote: >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. |