[wp-hackers] Select Menu to filter results by Custom Values

Peter Westwood peter.westwood at ftwr.co.uk
Fri Nov 21 22:19:14 GMT 2008


Kelter-BadCat Design wrote:
> Bingo! As I suspected - that was the issue.
>
> OK - So who wants to hold my hand through SQL queries  ;-)
>
>   
Crafted from the querys in update_postmeta_cache and update_post_meta:

$wpdb->get_results($wpdb->prepare("SELECT DISTINCT meta_value FROM 
$wpdb->postmeta WHERE meta_key = %s", $meta_key) , ARRAY_A)

untested of course.

westi

-- 
Peter Westwood
http://blog.ftwr.co.uk | http://westi.wordpress.com
C53C F8FC 8796 8508 88D6 C950 54F4 5DCD A834 01C5 



More information about the wp-hackers mailing list