[wp-hackers] meta_value contains text

Jörn Röder kontakt at joernroeder.de
Sun Aug 16 21:42:19 UTC 2009


Hi,
OR works, but returns not what i want… i will filter posts witch have  
both… meta_value_1 AND meta_value_2


Am 16.08.2009 um 23:30 schrieb Ashok Padda:

> You may have to use OR, instead of AND. Try following, instead.
>
>    $where .= " AND ( meta_key = '$key' AND meta_value LIKE('%$val 
> %') ) OR
> meta_value = 'foo' ";
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers



More information about the wp-hackers mailing list