Use to work with a MySQL + + (library for C + +)
The database has some fields for which you AUTO_INCREMENT.
How to know what value will these fields when inserting a new row to the table?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
You could use
mysql_insert_id()C API function to retieve the auto-increment value after an insert.See also MySql Reference Manual