Here in this code i have to display all the records from the Table(cust_college). but this function is returning me only 1'st row of that table not other rows.please tell me solution
$read = Mage::getSingleton('core/resource')->getConnection('core_read');
$a = "SELECT * from cust_college";
$qry = $read->query($a);
$res = $qry->fetch(PDO::FETCH_ASSOC); //fetch row
foreach ($res as $payment) {
echo $payment = $res[college];
echo $payment = $res[value_id];
echo $payment = $res[shop_id];
echo $payment = $res[cust_address];
}
$store = Mage::app()->getStore()->getCode();