I need to display a price chart on the front-end, i've tried several things, as you'll notice in the code below the $product_info and $pInfo->. What am I missing?

Any help greatly appreciated.


PHP Code:
 if ($sppc_customer_group_id == '5') {

      $attributes_query = tep_db_query("select customers_group_id, customers_group_price, products_price1, products_price2, products_price3, products_price4, products_price5, products_price6, products_price7, products_price8, products_price1_qty, products_price2_qty, products_price3_qty, products_price4_qty, products_price5_qty, products_price6_qty, products_price7_qty, products_price8_qty, products_qty_blocks from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . $pInfo->products_id . "' and customers_group_id = '" . $customers_group['customers_group_id'] . "' order by customers_group_id");
      


?>



<tr><td>
<table class="pricechart" border="1" cellspacing="0" cellpadding="3" style="width: 125px; height: 200px">
    <tbody>
        <tr>
            <td colspan="2" style="vertical-align: top">
            <p>Quantity Discounts</p>
            </td>
        </tr>
        <tr>
            <td style="background-color: rgb(255,102,0); width: 15px"><span style="color: white">Quantity</span></td>
            <td style="background-color: rgb(204,0,0); color: white">Price</td>
        </tr>
        <tr>
            <td><?php echo $pInfo->products_price ?></td>
            <td><?php echo  $pInfo->products_price?></td>
        </tr>
        <tr>
            <td><?php 
if (tep_not_null($pInfo->products_price2)) {
            echo 
$pInfo->products_price2;
            }
            
?>
            </td>
            <td><?php 
if (tep_not_null($product['products_price2'])) {
            echo  
$product['products_price2']; 
            }
            
            
?></td>
        </tr>
     <tr>
            <td><?php 
if (tep_not_null($product_info['products_price3_qty'])) {
            echo 
$product_info['products_price3_qty']; 
            }
            
?></td>
            <td><?php 
if (tep_not_null($products_price3)) {
            echo 
$product_info['products_price3']; 
            }
            
            
?></td>
        </tr>
     <tr>
            <td><?php 
if (tep_not_null($product_info['products_price4_qty'])) {
            echo 
$product_info['products_price4_qty']; 
            }
            
?></td>
            <td><?php 
if (tep_not_null($product_info['products_price4'])) {
            echo 
$product_info['products_price4']; 
            }
            
            
?></td>
        </tr>
     <tr>
            <td><?php 
if (tep_not_null($product_info['products_price5'])) {
            echo 
$product_info['products_price5_qty']; 
            }
            
?></td>
            <td><?php 
if (tep_not_null($product_info['products_price5'])) {
            echo 
$product_info['products_price5']; 
            }
            
            
?></td>
        </tr>
     <tr>
            <td><?php 
if (tep_not_null($product_info['products_price6'])) {
            echo 
$product_info['products_price6_qty']; 
            }
            
?></td>
            <td><?php 
if (tep_not_null($product_info['products_price6'])) {
            echo 
$product_info['products_price6']; 
            }
            
            
?></td>
        </tr>
     <tr>
            <td><?php 
if (tep_not_null($products_price7_qty)) {
            echo 
$attributes['products_price7_qty']; 
            }
            
?></td>
            <td><?php 
if (tep_not_null($products_price7)) {
            echo 
$attributes['products_price7']; 
            }
            
            
?></td>
        </tr>
    </tbody>
</table>
</td></tr>


<?php
}
?>