|
Posted by number1.email on 04/29/06 19:54
I have a question regarding incrementing records in a mySQL Database
Table. For example, if the User Table has a UserID field as the
primary index, I could always Select the MAX(userid) field, increment
it, and add a new user this way. Problem is, what if someone also
requests this same userid before I "insert" my record? This would
cause a problem as it is not unique... In Oracle you can "Select <val>
from dual", which is automatically updated...so no person gets the same
number. Does mySQL have something similar, like a counter field? How
do I go about this?
Thanks...
Navigation:
[Reply to this message]
|