[wp-trac] [WordPress Trac] #49429: There seems to be no way to check query value for NULL
WordPress Trac
noreply at wordpress.org
Fri Feb 14 12:18:42 UTC 2020
#49429: There seems to be no way to check query value for NULL
--------------------------------------+------------------------------
Reporter: Jossnaz | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Query | Version: 5.3.2
Severity: normal | Resolution:
Keywords: 2nd-opinion dev-feedback | Focuses:
--------------------------------------+------------------------------
Comment (by SergeyBiryukov):
Replying to [comment:3 valentinbora]:
> I've tested this via WP CLI and haven't so far found a way to use "IS
NULL" or "IS NOT NULL"
`IS NULL` is not a supported value for `compare`, `NOT EXISTS` can be used
instead, see [21185].
`EXISTS` can also be used by omitting a value to check, but apparently
it's indeed not an equivalent for `IS NOT NULL`, per the ticket
description.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/49429#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list