$db = Mage::getSingleton(‘core/resource’)->getConnection(‘core_write’);
$result=$db->query(“SELECT * FROM PCDSTable”);
$connect = Mage::getSingleton('core/resource')->getConnection('core_read');
$result=$db->query(“SELECT id FROM `customer_wishlists` WHERE `type`='wishlist'");
How to run custom MySql query in Magento ?
Ad comes here
PHP blog
Comments
Leave A Comment