Magento Engineer
social
Journal

How to run custom MySql query in Magento ?

$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'");

Ad comes here
Comments
Leave A Comment
PHP blog
Update Cookies Preferences