RE: [PHP-WIN] Unique id Number

2002-01-14 Thread Svensson, B.A.T. (HKG)
From: Asendorf, John Sent: Monday, January 14, 2002 4:49 PM >You can, but there are a number of issues to deal with. One of the >potential solutions is to grab the MAX value from the table id field and >then increment that number for the next inserted record. The problem arises >though when you

Re: [PHP-WIN] Unique id Number

2002-01-14 Thread Piotr Pluciennik
Hi, yes, you can. If you're using MySQL try to use mysql_insert_id function - it should solve your problem. For more explanations and examples - see manual: http://www.php.net/manual/en/function.mysql-insert-id.php and for all mysql functions: http://www.php.net/manual/en/ref.mysql.php Greeting

Re: [PHP-WIN] Unique id Number

2002-01-14 Thread Ross Fleming
That's what I originally did but it can create loads of problems if you remove entries from the database or something similar. Is it SQL you're using? If so then i BELIEVE that there is a way of defining a field to do this automatically, instead of calling a field 'int' or whatever, I remember t

RE: [PHP-WIN] Unique id Number

2002-01-14 Thread Asendorf, John
You can, but there are a number of issues to deal with. One of the potential solutions is to grab the MAX value from the table id field and then increment that number for the next inserted record. The problem arises though when you have multiple users attempting to add records... --