I use the MySQL C API to create a db client application, and I need to get the last auto-increment value in the INSERT statement, so mysql_insert_id does.
But this client is multi-threaded and the piece of code looks like this:
mysql_query (conn, query_string); value = mysql_insert_id (conn);
I do not know what it will return, this request will automatically generate id or something else. Any clues?
Thanks in advance.
source
share