View Single Post
  #8  
Old May 10th, 2012, 11:43 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi

Adding something like this to your View:

HTML Code:
  <?php if (@$_GET['merchant_id']) : ?>
  <li>
    <b>Merchant: </b> 
    <?php echo dfr_get_merchant($_GET['merchant_id']); ?>
  </li>
<?php endif; ?>
And something like this to your theme's functions.php file:

PHP Code:
function dfr_get_merchant($mid=false) {
    global 
$wpdb;
    
$merchant_name $wpdb->get_var$wpdb->prepare("
        SELECT merchant 
        FROM "
.$wpdb->prefix."dfr_shop_products
        WHERE merchant_id = %d
        Limit 1"

        
$mid
    
) );
    return 
$merchant_name;

... worked for me.

Eric