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

Re: [PHP-DB] Auto Increment

2002-10-07 Thread Mark Nenadov
On October 8, 2002 01:49 am, Gavin Nouwens wrote: Hi peoples, Just wondering if it's possible with mysql to start an auto-increment field at a specified number instead of 0001? I could always just code it in php to add another number onto it to get it to the right start point, but leaves

RE: [PHP-DB] Auto Increment

2002-10-07 Thread John W. Holmes
CREATE TABLE table_name (ID INT NOT NULL AUTO_INCREMENT = 1 PRIMARY KEY, ... ); ---John Holmes... -Original Message- From: Gavin Nouwens [mailto:[EMAIL PROTECTED]] Sent: Monday, October 07, 2002 9:50 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Auto Increment Hi peoples,

Re: [PHP-DB] Auto Increment Problems....

2002-07-29 Thread Daniel Brunner
Once again... ALTER TABLE table1 AUTO_INCREMENT = 500 Dan On Monday, July 29, 2002, at 10:44 PM, [EMAIL PROTECTED] wrote: rite, my primary key column (id) is set to auto_increment as usual which is very handy. But when I delete a row, the auto_increment just keeps incrementing

Re: [PHP-DB] Auto Increment Problems....

2002-07-29 Thread Georgie Casey
why, is this question asked a lot??? anywa, thanks, i was gonna try something like that from something i read in the mysql manual, but it only mentioned it passing and didnt give an example or anything. tanx Daniel Brunner [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL

Re: [PHP-DB] Auto Increment Problems....

2002-07-29 Thread Daniel Brunner
Yeah, it's asked a lot!! And I've always answered that question( it's not the only question I answer!!! ) But Good Luck!! And your welcome!!! Dan On Monday, July 29, 2002, at 10:51 PM, [EMAIL PROTECTED] wrote: why, is this question asked a lot??? anywa, thanks, i was gonna try

Re: [PHP-DB] Auto Increment Problems....

2002-07-29 Thread Raquel Rice
On Mon, 29 Jul 2002 20:44:54 -0700 Georgie Casey Georgie Casey [EMAIL PROTECTED] wrote: rite, my primary key column (id) is set to auto_increment as usual which is very handy. But when I delete a row, the auto_increment just keeps incrementing and there's this 'hole' left where I deleted

RE: [PHP-DB] auto increment

2002-06-14 Thread Howard Picken
If you run an optimize or a repair on your datafile it'll set the autoincrememtn back to next number Howard -Original Message- From: Daniele Baroncelli [mailto:[EMAIL PROTECTED]] Sent: Friday, 14 June 2002 11:27 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] auto increment Hi guys, The

RE: [PHP-DB] auto increment

2002-06-14 Thread José Moreira
hello, i think u have to create the series yourself ... before u insert every record, first calculate the next value : SELECT MAX(ID) AS NEXT FROM TABLE then u insert ... hope it helps ... -Mensagem original- De: Daniele Baroncelli [mailto:[EMAIL PROTECTED]] Enviada: sexta-feira, 14

Re: [PHP-DB] auto increment

2002-06-14 Thread Daniel Brunner
Hello!! ALTER TABLE $table1 AUTO_INCREMENT = 242 Replace the $table with your table's name and replace the end number with what number you want. Dan On Thursday, June 13, 2002, at 08:27 PM, [EMAIL PROTECTED] wrote: Hi guys, The auto_increment field of my MySQL table gives me 258,

Re: [PHP-DB] auto-increment question

2002-04-23 Thread szii
This is more of a MySQL question, but you can set the column default for the auto_increment column to something other than 1. Look up the SET DEFAULT clause of the table create / alter table calls. -Szii - Original Message - From: Dan Swensen [EMAIL PROTECTED] To: php [EMAIL

Re: [PHP-DB] auto-increment question

2002-04-23 Thread Dan Brunner
Hello!! ALTER TABLE table1 AUTO_INCREMENT = 1000; That should do it... You can use that anytime.. Dan On Tuesday, April 23, 2002, at 12:21 AM, [EMAIL PROTECTED] wrote: Hi all, I'm wondering if there is a way to start an auto-increment field at a number other than 1. I'm working on a