[wp-trac] [WordPress Trac] #47818: $wpdb should update ->insert_id also when `LAST_INSERT_ID(...)` is found

WordPress Trac noreply at wordpress.org
Fri Aug 2 06:44:30 UTC 2019


#47818: $wpdb should update ->insert_id also when `LAST_INSERT_ID(...)` is found
-------------------------+-----------------------------
 Reporter:  cpiber       |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Database     |    Version:
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 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

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/47818>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list