RE: [PHP] problem with mysql / auto increment fields.. ?
| From: | Chris McCluskey | Date: | Thu, 20 Feb 2003 00:34:38 +0000 |
| Subject: | RE: [PHP] problem with mysql / auto increment fields.. ? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-136284@lists.php.net to get a copy of this message | ||
MySql should insert a value into that column when you update if you are using an auto_increment
field. this value will always be unique. period.
-Chris
-----Original Message-----
From: Chad Day [mailto:cday@atpco.com]
Sent: Wed 2/19/2003 1:16 PM
To: php general
Cc:
Subject: [PHP] problem with mysql / auto increment fields.. ?
On my website there are a couple places where people can sign up ..
The querys after the sign up process look like
$blahblah = query(insert firstname lastname) values (blah blah blah)
$userid = mysql_insert_id($blahblah);
$insertintoothertable = query(userid, blah blah blah) etc.
it then uses this userid var to insert them into a variety of other tables
for other things on the site, such as a phpBB account, etc.
if multiple people are signing up for accounts at different places, is there
the possibility that a duplicate userid could be assigned, or anything like
that?
Thanks,
Chad
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php