Re: Getting the ID of a newly added record (C#)
Posted by: 精一 判治
Date: August 07, 2019 09:39PM

mysqli_insert_id () calculates the value of the column with Auto Increment specified.
Use MYSQL's Last_Insert_ID ().
SELECT last_insert_id ();
Or
If you know the name of the ID column,
SELECT MAX (ID column name) FROM table name;

https://dev.mysql.com/doc/refman/5.6/ja/information-functions.html#function_last-insert-id

Options: ReplyQuote


Subject
Written By
Posted
Re: Getting the ID of a newly added record (C#)
August 07, 2019 09:39PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.