RE: [PHP-DB] transaction locking

2003-12-08 Thread Angelo Zanetti
Hi ALek, Yes you can make the column auto_increment. YOu can also make the incrementations start at a particular value by using the ALTER command. EG: ALTER TABLE mytable AUTO_INCREMENT = 99; it will start your next inserted record with 99 for that specific column value. I am not 100% sure

Re: [PHP-DB] transaction locking

2003-12-05 Thread John W. Holmes
Aleks Kalynovych wrote: I have a couple forms that generate a unique ID based on taking the highest number in the ID column adding 1 to its value. The problem is that I dont save that number until the form is submitted. If 2 or more persons fill out the form at the same time they all get the same

Re: [PHP-DB] transaction locking

2003-12-05 Thread Miles Thompson
Aleks, Many programmers learned the hard way that the scheme you are proposing did not work when they went from a single user to a networked environment. You've not said what database you are using. If MySQL you can let it's autoincrement increase your key automatically, perhaps feed it back

RE: [PHP-DB] transaction locking

2003-12-05 Thread Aleks K
PROTECTED] Subject: Re: [PHP-DB] transaction locking Aleks, Many programmers learned the hard way that the scheme you are proposing did not work when they went from a single user to a networked environment. You've not said what database you are using. If MySQL you can let it's autoincrement increase

RE: [PHP-DB] transaction locking

2003-12-05 Thread Opec Kemp [ q u a s a r z ]
Hi, Aleks Kalynovych wrote: I have a couple forms that generate a unique ID based on taking the highest number in the ID column adding 1 to its value. The problem is that I dont save that number until the form is submitted. If 2 or more persons fill out the form at the same time they all

RE: [PHP-DB] transaction locking

2003-12-05 Thread Miles Thompson
: [PHP-DB] transaction locking Aleks, Many programmers learned the hard way that the scheme you are proposing did not work when they went from a single user to a networked environment. You've not said what database you are using. If MySQL you can let it's autoincrement increase your key automatically