[wp-trac] [WordPress Trac] #18410: WP_Query should unserialize serialized data before matching
WordPress Trac
wp-trac at lists.automattic.com
Mon Aug 15 12:06:28 UTC 2011
#18410: WP_Query should unserialize serialized data before matching
-------------------------+----------------------
Reporter: Doggie52 | Owner:
Type: enhancement | Status: closed
Priority: normal | Milestone:
Component: Query | Version: 3.2.1
Severity: normal | Resolution: wontfix
Keywords: |
-------------------------+----------------------
Changes (by scribu):
* status: new => closed
* resolution: => wontfix
* milestone: Awaiting Review =>
Comment:
First of all: arrays are not the prefered way of storing data in custom
fields; you can have multiple custom field values with the same key, for
the same post. All the more, if you plan on querying against custom field
values.
Secondly getting all the custom fields, unserializing them and then
looking for a match would be a really inefficient way to go about it.
Instead, you can call maybe_serialize() on the value you are trying to
match against.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18410#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list