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

Jennifer Hodgdon yahgrp at poplarware.com
Fri Nov 21 22:30:19 GMT 2008


And then you can't simply use the echo command to print the array. You 
need to do a PHP loop, and print it as a SELECT list. Check one of the 
WP drop-down functions for an example, if you're not a PHP expert, but 
if you print an array with echo, you just get the text "Array".

     --Jennifer

Peter Westwood wrote:
> 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
> 


-- 
Jennifer Hodgdon * Poplar ProductivityWare
www.poplarware.com

Drupal/WordPress Sites, Themes, Modules/Plugins
Custom Web Programming, Web Databases
PHP, Perl, MySQL, JavaScript, XML, AJAX



More information about the wp-hackers mailing list