When I perform an insert statement to a MySQL database in PHP, is there a way to return the auto-generated timestamp or do I need a separate call to the database to retrieve the data?
Edit: I forgot that MySQL doesn't use epoch dates. I decided to just use an autoincrementing integer and a stored procedure.
You need to make a separate request to get that information. You can only get the last insert ID of auto incremented tables when doing an INSERT.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With