[wp-hackers] meta_value contains text

scribu scribu at gmail.com
Sun Aug 16 21:58:22 UTC 2009


You would have to use this syntax:

CASE meta_key
  WHEN 'key1' THEN meta_value = 'value1'
  WHEN 'key2' THEN meta_value = 'value2'
END

and you also have to have a group by:

GROUP BY post_id
HAVING COUNT(*) > 2


All this functionality is wrapped in a plugin of mine: Custom Field
Taxonomies <http://scribu.net/wordpress/custom-field-taxonomies>.


-- 
http://scribu.net


More information about the wp-hackers mailing list