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...

---------------------
John Asendorf - [EMAIL PROTECTED]
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631
Nullum magnum ingenium sine mixtura dementiae fuit


> -----Original Message-----
> From: James Mansfield [mailto:[EMAIL PROTECTED]]
> Sent: Monday, January 14, 2002 10:48 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Unique id Number
> 
> 
> OK...newbie question it must be:
> I want to add an entry into a db tb (using php obviously) and 
> when its added
> into the db its gets a sequencially numberred id....now can I 
> retrieve this
> id numbe rin the same php coded page as what I create the 
> entry with? If not
> what is the best way around it? Create a unique number for 
> the entry before
> adding it into db??
> 
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: 
> [EMAIL PROTECTED]
> 

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to