/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/* Snipset for db query */ $dbConf = Mage::getConfig()->getNode('global/resources/default_setup/connection'); $db = new Zend_Db_Adapter_Pdo_Mysql(array('host'=> $dbConf->host, 'username' => $dbConf->username, 'password' => $dbConf->password, 'dbname'=> $dbConf->dbname)); 'product_id' => $product->getId(), /* etc... */ ); $db->insert('catalog_product_link',$link_data); $db->closeConnection();