note 82928 deleted from function.mysql-insert-id by cmb
| From: | cmb@php.net | Date: | Sun, 16 Feb 2020 13:24:29 +0000 |
| Subject: | note 82928 deleted from function.mysql-insert-id by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-214108@lists.php.net to get a copy of this message | ||
Note Submitter: Anonymous
----
"Why on earth are you all arguing about the best way to get the next auto_increment value? The
whole point is that it increments automatically. The name should be a give away."
Because you need the same last id value in another table. So you need a way to identify it, in order
to use it in the next query. This way its easier than using a new query to get the id like ORDER BY
id DESC LIMIT 1