zoukankan      html  css  js  c++  java
  • magento直接操作数据库

     
         $write = Mage::getSingleton("core/resource")->getConnection('core_write');
         $table = Mage::getSingleton('core/resource')->getTableName('abc');
         $write->insert($table,array('name'=>'hello'));
     
         $write = Mage::getSingleton("core/resource")->getConnection('core_write');
        $table = Mage::getSingleton('core/resource')->getTableName('abc');
        $write->update($table,array('name'=>'abc'),array('id'=>3));
     
            $write = Mage::getSingleton("core/resource")->getConnection('core_write');
        $table = Mage::getSingleton('core/resource')->getTableName('abc');
        $write->delete($table,array('id'=>3));
     
         $read = Mage::getSingleton("core/resource")->getConnection('core_read');
        $table = Mage::getSingleton('core/resource')->getTableName('abc');
            $result = $read->select()->from(array('main_table'=>$table))->where('main_table.id',3)->limit(1);
            $products=$read->fetchAll($result);
  • 相关阅读:
    【HDOJ】1058 Humble Numbers
    activity去标题栏操作&保留高版本主题
    谷歌安卓官方开发者网站 https://developer.android.google.cn
    TortoiseGIT
    Git的优势
    eoe开发社区
    安卓巴士 http://www.apkbus.com/
    Git简介
    SVN标准目录结构
    关于人生的
  • 原文地址:https://www.cnblogs.com/dongtong/p/5852440.html
Copyright © 2011-2022 走看看