Make WordPress Core

Opened 5 years ago

#47818 new enhancement

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

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


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.

Change History (0)

Note: See TracTickets for help on using tickets.