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
-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
(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
) 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
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,
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
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