[wp-trac] [WordPress Trac] #15158: wpdb insert & update with null values

WordPress Trac noreply at wordpress.org
Wed Sep 30 01:19:48 UTC 2015


#15158: wpdb insert & update with null values
----------------------------------+-----------------------
 Reporter:  westi                 |       Owner:  sorich87
     Type:  enhancement           |      Status:  reopened
 Priority:  normal                |   Milestone:  4.4
Component:  Database              |     Version:  3.0.1
 Severity:  normal                |  Resolution:
 Keywords:  has-patch needs-docs  |     Focuses:
----------------------------------+-----------------------
Changes (by pento):

 * keywords:  needs-patch => has-patch needs-docs
 * milestone:  Future Release => 4.4


Comment:

 [attachment:15158.2.diff] is something of a modernisation of the behaviour
 in [attachment:15158.diff]. It's actually a port of [backpress 279], which
 has been running on WordPress.com for years.

 > Both NULL and 'null' as a case-insensitive string should probably be
 accepted as a format.

 I'm specifically ignoring the format, though I have no problem with
 documenting that it should be `NULL`, for clarity of code. @DrewAPicture,
 can you give your thoughts on updating the docs for `::insert()`,
 `::replace()`, `::update()` and `::delete()`?

 With regards to @jbutkus' patches - adding NULL support to `::prepare()`
 is an interesting problem, but it's way outside of the scope of this
 ticket. Let's handle it in #12819.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/15158#comment:42>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list