Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7409557
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T06:06:02+00:00 2026-05-29T06:06:02+00:00

I am building a web application, which can be used by multiple users simultaneously.

  • 0

I am building a web application, which can be used by multiple users simultaneously. They can add data at the same time.

I have a table named doctor_main as follows

Screenshot of DB http://img687.imageshack.us/img687/7033/testxqz.png

Once a record about a doctor is added, I want the id of the inserted record(which is an auto increment field) to be returned.

I know i can use methods like LAST_INSERT_ID() and mysql_insert_id. But i don’t know how it behaves.

I need the exact id of the record which is inserted by that particular user.

Sometimes, if two users are trying to insert a record, the id which is returned shouldn’t get exchanged.

To achieve this what kind of mysql function should i use ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T06:06:02+00:00Added an answer on May 29, 2026 at 6:06 am

    There’s a whole page in the manual dedicated to this subject:

    • How to Get the Unique ID for the Last Inserted Row

    Here’s a quote from that page that should help answer your question:

    For LAST_INSERT_ID(), the most recently generated ID is maintained in the server on a per-connection basis. It is not changed by another client.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm building a PHP Web Application for Company A in which users can login
I am building a Struts2 web application which uses tiles however I have discovered
Im building a web application which is a process management app. Several different employee
I'm looking for some opinions here, I'm building a web application which has the
I’m building a J2EE web application which uses Oracle SSO with an OID back-end
I'm building an ASP .NET 2.0 (C#) based web application, which is primarily intended
I'm building a web application that guides my users through the configuration and installation
I am building a web application that uses the database for Users, Security/roles, and
I'm building a web application using Stripes and Spring. It needs to have a
I'm building a 4 layered ASP.Net web application. The layers are: Data Layer Entity

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.