Opened 6 years ago
#47818 new enhancement
$wpdb should update ->insert_id also when `LAST_INSERT_ID(...)` is found
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Awaiting Review | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Database | Keywords: | |
| Focuses: | Cc: |
Description
It is possible to set the insert id pointer manually by in including LAST_INSERT_ID(column) anywhere in the statement. $wpdb however does not update it's internal insert_id, it does this only when the statement is 'insert' or 'replace'. This makes it harder to get the ID of an updated row.
https://stackoverflow.com/a/46335863
Note: See
TracTickets for help on using
tickets.