REMINDER
Please be respectful of all AppDragers! Keep it really civil so that we can make the AppDrag community of builders as embracing, positive and inspiring as possible.
[TM] LAST_INSERT_ID not working
-
Hello,
It seems like this always returns 0 :
https://dev.mysql.com/doc/refman/8.0/en/information-functions.html#function_last-insert-idFor the following reason probably (quote from Stackoverflow)
The problem seemed to be in MySQL's phpmyadmin config file PersistentConnections set to FALSE which resulted in a new CONNECTION_ID every time a query was issued - therefore rendering SELECT LAST_INSERT_ID() ineffective.Is there a way tog et the ID of the last inserted row ?
I'm doing a "full" select after my insert now, it's not idealThanks,
Best regarsd, -
Hey Pierre,
This must be done in the same transaction, please check this tutorial about it:
https://support.appdrag.com/blog/63-Inserting-a-Row-in-the-Database--Create-New-Row-Id.html?category=13