[wp-trac] [WordPress Trac] #27272: WP meta queries comparing apples to oranges
WordPress Trac
noreply at wordpress.org
Tue Mar 25 04:20:50 UTC 2014
#27272: WP meta queries comparing apples to oranges
------------------------------------------+--------------------
Reporter: Denis-de-Bernardy | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.9
Component: Query | Version: 3.8.1
Severity: normal | Resolution:
Keywords: needs-patch needs-unit-tests | Focuses:
------------------------------------------+--------------------
Changes (by Denis-de-Bernardy):
* version: 3.7.1 => 3.8.1
Comment:
I think I preferred the first patch. Casting both side leaves the door
open to doing:
{{{
where cast(meta_key as date) > cast(%s as date)
}}}
At a conceptual level, I'd suggest the following high-level test case:
1. Insert post where meta_value = 2
2. Verify that it's found if the meta value query is >= 1
3. Verify that it's NOT found if the meta value query is >= 10
--
Ticket URL: <https://core.trac.wordpress.org/ticket/27272#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list