[wp-trac] [WordPress Trac] #23033: Decimal and numeric options in meta_query do not produce correct MYSQL for floating point numbers comparisons

WordPress Trac noreply at wordpress.org
Tue Jan 15 14:33:06 UTC 2013


#23033: Decimal and numeric options in meta_query do not produce correct MYSQL for
floating point numbers comparisons
--------------------------+-----------------------------
 Reporter:  ericlewis     |       Owner:  wonderboymusic
     Type:  defect (bug)  |      Status:  accepted
 Priority:  normal        |   Milestone:  3.6
Component:  Query         |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |
--------------------------+-----------------------------
Changes (by knutsp):

 * cc: knut@… (added)


Comment:

 Replying to [comment:2 wonderboymusic]:
 > We should probably be casting the value (10.5) so the query doesn't end
 up = (string) '10.5'. We should also support FLOAT.
 Cast 10.5 to 10.5 is meaningless. The value is already a float. The
 problem seems to be that the value is converted to a string when it
 shouldn't.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23033#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list