The question:
Is there anything in MySQL that will allow me to determine, accurately, the
last auto-incremented field from a particular database, so I can then insert
based upon this into another table? What if 2 users input at the same time?
Please see the 'long explanation' for further
Since you should still have the same information that you used to create
your entry in the candidate table you can do something like:
SELECT @candidateID := Candidate_ID
FROM candidate
WHERE Last_Name = '$lastname'
AND First_Name = '$firstname'
AND Middle_Initial = '$middle'
Yes, LAST_INSERt_ID(). It's connection-specific, not db-specific. Because
it is connection-specific, your 2-users issue is avoided. See the manual
for the details http://dev.mysql.com/doc/mysql/en/Getting_unique_ID.html.
Michael
Eve Atley wrote:
The question:
Is there anything in MySQL that