472,119 Members | 1,786 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,119 software developers and data experts.

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

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

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


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

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 leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.