Monday, 3 September 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

Note: only a member of this blog may post a comment.