[PHP-DB] Auto-increment questions...

2004-10-05 Thread NIPP, SCOTT V \(SBCSI\)
I am working on a database application for Unix user accounts. I want to be able to have a system that will provide me the next available numeric user ID. I have created a 2 column index table that simply includes UID and user name. This field is autoincrement and the primary key for the

RE: [PHP-DB] Auto-increment questions...

2004-10-05 Thread NIPP, SCOTT V \(SBCSI\)
-Original Message- From: Bastien Koert [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 05, 2004 12:45 PM To: NIPP, SCOTT V (SBCSI); [EMAIL PROTECTED] Subject: RE: [PHP-DB] Auto-increment questions... If its an autoincrement, the next highest number will be assigned by the db. There is no need

RE: [PHP-DB] Auto-increment questions...

2004-10-05 Thread Hutchins, Richard
(SBCSI) [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 05, 2004 2:00 PM To: Bastien Koert; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Auto-increment questions... OK. The problem is I don't want the next highest number. There are gaps in the UID sequence. I need to find the next UNUSED

Re: [PHP-DB] Auto-increment questions...

2004-10-05 Thread Daniel Brunner
) 858-1289 E-mail: [EMAIL PROTECTED] Web: http:\\ldsa.sbcld.sbc.com -Original Message- From: Bastien Koert [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 05, 2004 12:45 PM To: NIPP, SCOTT V (SBCSI); [EMAIL PROTECTED] Subject: RE: [PHP-DB] Auto-increment questions... If its

Re: [PHP-DB] Auto-increment questions...

2004-10-05 Thread Andrew Kreps
On Tue, 5 Oct 2004 12:59:55 -0500, NIPP, SCOTT V (SBCSI) [EMAIL PROTECTED] wrote: OK. The problem is I don't want the next highest number. There are gaps in the UID sequence. I need to find the next UNUSED number in the sequence which is rarely the highest number. As far as I know,

Re: [PHP-DB] Auto-increment questions...

2004-10-05 Thread Andrew Kreps
On Tue, 5 Oct 2004 14:18:55 -0700, Andrew Kreps [EMAIL PROTECTED] wrote: if (isset ($lastId) ($lastId $id - 1)) { $returnVal = $lastId + 1; } Sorry, I left a bit of a bug in there. You should exit the loop at this point, if you've found a gap. -- PHP Database Mailing

Re: [PHP-DB] Auto-increment questions...

2004-10-05 Thread John Holmes
NIPP, SCOTT V (SBCSI) wrote: I am working on a database application for Unix user accounts. I want to be able to have a system that will provide me the next available numeric user ID. I have created a 2 column index table that simply includes UID and user name. This field is