[Phplib-trackers] [ phplib-Bugs-549643 ] db_mysql.inc nextid() robustness
Brought to you by:
nhruby,
richardarcher
|
From: <no...@so...> - 2002-04-28 00:14:25
|
Bugs item #549643, was opened at 2002-04-28 10:14 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=403611&aid=549643&group_id=31885 Category: DB_SQL Group: current CVS Status: Open Resolution: None Priority: 5 Submitted By: Richard Archer (richardarcher) Assigned to: Richard Archer (richardarcher) Summary: db_mysql.inc nextid() robustness Initial Comment: Max wrote: > *** 266,269 **** > --- 280,287 ---- > $seq_name); > $id = @mysql_query($q, $this->Link_ID); > + if (!$id) { > + $this->>halt('query failed in nextid: '.$q); > + return 0; > + } Should we instead look for mysql_error or mysql_errno to check if the nextid query failed? The new code will not work, if we initiate a new sequence using nextid(), since it will always return 0. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=403611&aid=549643&group_id=31885 |