Wednesday, April 13, 2011

wordpress filters

located in:
wp-includes/default-filters.php

Monday, April 4, 2011

linux reference a file start with a dash

problem:

say you have a file, its name start with a dash, when you try to use command on that file, it will result in error,


solution:

use command ./-xxxxxxxxxxxxxxx instead of command -xxxxxxxxxxxxxxx

Wednesday, March 30, 2011

magento how to debug sql query

edit this file: lib/varien/Db/Adapter/Pdo/Mysql.php

protected $_debug = true;
protected $_logAllQueries = true;
protected $_debugFile = 'var/debug/sql.txt';

Tuesday, March 22, 2011

magento import export cms pages

mysqldump cms_page and cms_page_store tables

and restore to your destination database

Monday, March 14, 2011

Tuesday, March 8, 2011

mysql find all columns in a database

SELECT table_name, column_name from information_schema.columns WHERE column_name LIKE ’%searchTerm%’ AND table_schema = ‘yourDB’