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

WordPress Trac noreply at wordpress.org
Fri May 6 23:33:19 UTC 2022


#54042: Extending wpdb::prepare() to support table/field names, and IN() operator
-------------------------------------------------+-------------------------
 Reporter:  craigfrancis                         |       Owner:  (none)
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  Future
                                                 |  Release
Component:  Database                             |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch dev-feedback needs-        |     Focuses:
  testing early has-unit-tests                   |
-------------------------------------------------+-------------------------

Comment (by craigfrancis):

 Hi @apokalyptik, I'm not at my computer, but have you checked the
 [https://github.com/WordPress/wordpress-develop/pull/2191 patch] I've
 provided ([https://wpdb.eiv.dev/ test/download], note the last link
 includes support for `IN()`), it uses a slightly different syntax (`%...d`
 vs `%,d`) in a similar way to how [https://wiki.php.net/rfc/variadics
 variadics works in PHP], but I ''think'' it covers all the points you
 raised, and works with [https://core.trac.wordpress.org/ticket/52506
 table/field name] (identifiers) [https://github.com/WordPress/wordpress-
 develop/pull/2192 patch] that's had a few reviews already... if I've
 missed anything, please let me know.

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


More information about the wp-trac mailing list