Month: April 2015

magento

delete order test

SET FOREIGN_KEY_CHECKS=0; TRUNCATE `sales_flat_creditmemo`; TRUNCATE `sales_flat_creditmemo_comment`; TRUNCATE `sales_flat_creditmemo_grid`; TRUNCATE `sales_flat_creditmemo_item`; TRUNCATE `sales_flat_invoice`; TRUNCATE `sales_flat_invoice_comment`; TRUNCATE `sales_flat_invoice_grid`; TRUNCATE `sales_flat_invoice_item`; TRUNCATE `sales_flat_order`; TRUNCATE `sales_flat_order_address`; TRUNCATE `sales_flat_order_grid`; TRUNCATE `sales_flat_order_item`; TRUNCATE `sales_flat_order_payment`; TRUNCATE `sales_flat_order_status_history`; TRUNCATE `sales_flat_quote`; TRUNCATE `sales_flat_quote_address`; TRUNCATE `sales_flat_quote_address_item`; TRUNCATE `sales_flat_quote_item`; TRUNCATE `sales_flat_quote_item_option`;...

Mac pro

add ssh in mac

user@localhost: ssh-keygen -t dsa Generating public/private dsa key pair. Enter file in which to save the key (/Users/user/.ssh/id_dsa): id_dsa Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in id_dsa. Your public key has...

magento

use zend adapter conncet exterme DB

$db = new Zend_Db_Adapter_Pdo_Mysql(array( 'host' => '174.142.90.89', 'username' => 'devleero_app', 'password' => 'app123', 'dbname' => 'devleero_vu_centerdata', 'profiler' => true, )); $profiler = $db->getProfiler(); $sql='select * from product_simple'; $data=$result = $db->fetchAssoc($sql);; $i=0; foreach($data as $d) { var_dump($d); $i++; } echo 'total:'.$i;