Created
May 8, 2013 17:50
-
-
Save roscius/5542196 to your computer and use it in GitHub Desktop.
Magento DB Functions
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
| $resource = Mage::getSingleton('core/resource'); | |
| $readConnection = $resource->getConnection('core_read'); | |
| $results = $readConnection->fetchCol('SELECT somecolumn FROM sometable'); | |
| foreach ($results as $result) { | |
| echo $result; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment