In php I have an INSERT query to database. This query add some issue to database. I want to check if issue was added fine (there are some cases when issue doesn't added - without any mistake reporting). How to check this?
I have an idea, that after i make INSERT query i should make a query, for example: SELECT ..... WHERE id=last_id
. But how to get the last_id - how to get id of last INSERT query? (id is autoincrementing sql field)
Thank you
You may find the answer to this StackOverflow question useful:
mysql_insert_id function returns id of previously inserted record.
I assume you're working with MySQL
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.