Thursday, November 1, 2012

Magento Database Connection

$sql = Mage::getSingleton('core/resource')->getConnection('core_write');
$result = $sql->query("SELECT class_name from tax_class");

while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
echo $row['class_name']."<br />";
}

No comments:

Post a Comment

Please mention your comments.......