In PHP/MySQL the mysql_insert_id returns the last insert id of the entire mysql database or the id from that one db connection made by the script?
-
When every user of my site interacts with the PHP scripts. Some thousand connections are made to the MySQL db. So the mysql_insert_id function returns the last insert id of the overall database made by many php db connections or it returns only the last insert of that particular db connection.
-
Answer:
It returns the ID of the last executed query (usually 'INSERT') of that particular connection. http://nl.php.net/manual/en/function.mysql-insert-id.php
Giel Berkers at Quora Visit the source
Other answers
It's per-connection.
Toby Thain
Related Q & A:
- How To Build Business Directory Using Php Mysql?Best solution by Stack Overflow
- where is the index physically located in MySQL database?Best solution by Database Administrators
- How to manage MySQL database in Azure?Best solution by stackoverflow.com
- How to do a local mysql database replication on an online server?Best solution by howtoforge.com
- How to Display an Image in PDF, which is retrieved from MySql Database :JSP and iText?Best solution by Stack Overflow
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.