php - When INSERTing into a table can I get the value of the automatically incremented primary index? -


I am inserting one line into a table and automatically want to get the value of the increased primary index.

The primary index is the only unique value in the table, so to prevent ambiguity from "SELECT [primary index] [table] where [column = the figure I have just inserted]" nothing Want to do I do not want to select my previous row because a line may have been inserted between my INSERT and SELECT statement.

I can put an empty row, select the primary index and update the row with the data but it looks like quite an ugly hack, it makes me believe that their It is important that you put the primary schematic so far through the mysqli API, because I think it would be very omnipresent to do.

Is anyone answering me?

Your answer is

You've tagged your question with "mysqli" right, in which case you will use


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -