Support » How-To and Troubleshooting » [Resolved] 2.7.1 query_posts meta_compare bug?!

[Resolved] 2.7.1 query_posts meta_compare bug?!

  • With 2.7.1, for example, assign following to a post:

    meta_key: number
    meta_value: 5

    now you do query_posts():


    The above will list the post which you have assigned a meta_value 5.

    After spending many hours on this issue, I finally find out that ‘meta_compare’ is treating ‘meta_value’ as “alphabets”, not as values. It looks ‘meta_compare’ thinks 99 is ‘larger’ than 100 because the later one starts with ‘1’ while the first one starts with ‘9’.

    Is this a bug?! If not then the related part of this document should be revised: http://codex.wordpress.org/Template_Tags/query_posts

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] 2.7.1 query_posts meta_compare bug?!’ is closed to new replies.