[wp-trac] [WordPress Trac] #54042: Extending wpdb::prepare() to support table/field names, and IN() operator

WordPress Trac noreply at wordpress.org
Wed Oct 27 13:52:52 UTC 2021


#54042: Extending wpdb::prepare() to support table/field names, and IN() operator
--------------------------+------------------------------
 Reporter:  craigfrancis  |       Owner:  (none)
     Type:  enhancement   |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Database      |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+------------------------------

Comment (by craigfrancis):

 I used `%i` for "Identifier"; and because
 [https://en.wikipedia.org/wiki/Printf_format_string#Type_field printf()]
 in C uses `%d` and `%i` for Integers, whereas PHP only uses `%d` (so PHP
 is unlikely to use `%i` for anything else).

 I'd like this to be included in 5.9, as it shouldn't cause any backwards
 compatibility issues; and I want to focus on the `'WHERE id = %5s'`
 problem in 6.0 (that will require more discussion and testing).

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


More information about the wp-trac mailing list