Created
June 11, 2019 15:01
-
-
Save Alexander-Pop/ddb40cb61fdad1ebd994c2d5dda2d381 to your computer and use it in GitHub Desktop.
Magento - Database Query
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$sql = "SELECT sku FROM catalog_product_entity"; | |
$data = Mage::getSingleton(‘core/resource’) ->getConnection(‘core_read’)->fetchAll($sql); | |
if(!$data){ | |
echo 'empty'; | |
}else{ | |
foreach ($data as $data){ | |
echo $data['sku'].'Some description'; | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment