在这段代码中,我必须显示表(cust_college)中的所有记录。但是这个函数只返回该表的第一行而不是其他行。请告诉我解决方案
$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();