$db = Mage::getResourceSingleton('core/resource')->getConnection('core_write');
$result = $db->query('SELECT 'entity_id' FROM 'catalog_product_entity');
$result = $db->query('SELECT 'entity_id' FROM 'catalog_product_entity');
if(!$result) {
return FALSE;
}
return FALSE;
}
$rows = $result->fetch(PDO::FETCH_ASSOC);
if(!$row) {
return FALSE;
}
return FALSE;
}
print_r($row);
Source : http://www.richardcastera.com/
$conn = Mage::getSingleton('core/resource')->getConnection('core_read');
ReplyDelete// Prints a list of all website names
$results = $conn->fetchAll("SELECT * FROM core_website;");
foreach($results as $row) {
echo $row['name'] . "\n";
}