[wp-trac] [WordPress Trac] #41944: Add %u support to wpdb->prepare

WordPress Trac noreply at wordpress.org
Thu Sep 21 13:48:27 UTC 2017


#41944: Add %u support to wpdb->prepare
--------------------------+------------------------------
 Reporter:  charlestonsw  |       Owner:
     Type:  enhancement   |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Database      |     Version:  4.8.2
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by soulseekah):

 There is no unsigned type in PHP.
 http://php.net/manual/en/language.types.integer.php

 Moreover %u cannot replace %d as negative numbers are a valid placeholder.

 PHP_MAX_INT on 64-bit systems is 9223372036854775807. In order to pass
 larger number there are special libraries or the bcmath extension. These
 could be passed in as strings to MySQL for the unsigned column types.

 So %u wouldn't really help.

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


More information about the wp-trac mailing list