Skip to content

Instantly share code, notes, and snippets.

@tvlooy
Created January 31, 2014 15:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tvlooy/8734057 to your computer and use it in GitHub Desktop.
Save tvlooy/8734057 to your computer and use it in GitHub Desktop.
Magento query example
<?php
$db = Mage::getSingleton('core/resource')->getConnection('core_write');
$result = $db->query("SELECT * FROM cms_page");
while ($item = $result->fetch(PDO::FETCH_ASSOC)) {
print $item['title'] . ' | ';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment