Make WordPress Core

Opened 7 years ago

#47818 new enhancement

$wpdb should update ->insert_id also when `LAST_INSERT_ID(...)` is found

Reported by: cpiber Owned by:
Priority: normal Milestone: Awaiting Review
Component: Database Version:
Severity: normal Keywords:
Cc: Focuses:

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

Change History (0)

Note: See TracTickets for help on using tickets.