View Single Post
  #14  
Old March 7th, 2012, 05:01 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi

You could modify the query like this:

PHP Code:
function dfr_get_merchants() { 
    global 
$wpdb
    
$merchants $wpdb->get_results("SELECT merchant FROM ".$wpdb->prefix."dfr_shop_products WHERE cat_id = 670426 GROUP BY merchant"); 
    
$list = array(); 
    foreach (
$merchants as $merchants
        
$list[] = $merchants->merchant
    return 
$list

Replace 670426 with the Category ID you want to pull products from.

Eric