469,623 Members | 1,437 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,623 developers. It's quick & easy.

What is considered 'multiple clients' - LAST_INSERT_ID().

Markus
6,050 Expert 4TB
The MySQL manual states:

Using LAST_INSERT_ID() and AUTO_INCREMENT columns simultaneously from multiple clients is perfectly valid. Each client will receive the last inserted ID for the last statement that client executed.
I wonder what is considered a 'client'. Is that simply just different connections to the database?
Sep 4 '09 #1
5 2928
dlite922
1,584 Expert 1GB
Well don't know but it seems to work, so IMHO it's same to assume that's what a client means.

If it wasn't true if two people were using the app and both say...new users. the first user wouldn't get the first user's auto_increment ID.


Dan
Sep 4 '09 #2
mwasif
801 Expert 512MB
@Markus
Yes, each connection to MySQL will be considered a separate client.
Sep 4 '09 #3
Markus
6,050 Expert 4TB
@mwasif
Thanks for the clarification!
Sep 4 '09 #4
dlite922
1,584 Expert 1GB
That's what I just said! :)

j/k



Dan
Sep 4 '09 #5
Markus
6,050 Expert 4TB
@dlite922
I was thanking both of you, I just couldn't reply to you both (without more clicking).

;D
Sep 4 '09 #6

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

6 posts views Thread by jim | last post: by
3 posts views Thread by Vic Spainhower | last post: by
2 posts views Thread by Scott Cannon | last post: by
9 posts views Thread by Graham | last post: by
3 posts views Thread by jx2 | last post: by
2 posts views Thread by WebSnozz | last post: by
reply views Thread by devrayhaan | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.