Skip to content

Instantly share code, notes, and snippets.

@zainengineer
zainengineer / code_snippets.php
Last active June 20, 2016 03:10
eschrade Magento EE Indexes
<?php
// Decoded HTML for http://www.eschrade.com/page/indexing-in-magento-or-the-wonderful-world-of-materialized-views/
$logTable = Mage::getModel('log/log')->getResource()->getTable('url_table');
//Separator
$pkData = $this->_conn->getIndexList($logTable);
if (!isset($pkData['PRIMARY']['COLUMNS_LIST'][0])) {
Mage::throwException('Unable to find log table primary key');
@zainengineer
zainengineer / magento_enntry.php
Last active September 27, 2021 10:50
Magento entry script
<?php
umask(0);
require 'app/Mage.php';
Mage::setIsDeveloperMode(true);
error_reporting(E_ALL);
ini_set('display_errors', 1);
set_time_limit(0);
Mage::app();