View Single Post
Old January 17th, 2012, 04:29 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
Join Date: Feb 2008
Posts: 16,902

Here's an example of how to remove brands from the list. I've removed 'Adidas' and 'Atlas'. This example also shows how to capitalize the first letter in each word of the brand.
PHP Code:
function dfr_get_brands() {
$brands $wpdb->get_results("SELECT brand FROM ".$wpdb->prefix."dfr_shop_products 
    WHERE brand NOT IN('Adidas','Atlas') 
    GROUP BY brand"
$html '';
    foreach (
$brands as $brands) {
$html .= '<option value="'.$brands->brand.'">'.ucwords($brands->brand).'</option>';