Magento

Created Friday 02 January 2015

DB methods location:

/lib/Varien/Db/Adapter/Pdo/Mysql.php

Useful methods

/**
* Check is a table exists
*
* @param string $tableName
* @param string $schemaName
* @return boolean
*/
public function isTableExists($tableName, $schemaName = null)

/**
* Drop table from database
*
* @param string $tableName
* @param string $schemaName
* @return boolean
*/
public function dropTable($tableName, $schemaName = null)

DB table class:

/lib/Varien/Db/Ddl/Table.php

Useful methods

/**
* Retrieve name of table
*
* @throws Zend_Db_Exception
* @return string
*/
public function getName()

Reset admin pass

http://www.magentocommerce.com/wiki/recover/resetting-admin-password
UPDATE admin_user SET password=CONCAT(MD5('qXpassword'), ':qX') WHERE username='admin';

Enable template hints in admin

http://www.classyllama.com/development/magento-development/enable-templateblock-hints-in-admin-panel
insert into core_config_data (scope, scope_id, path, value) values ('default', 0, 'dev/debug/template_hints', 1), ('default', 0, 'dev/debug/template_hints_blocks', 1);



Backlinks: