2015-10-22 26 views

回答

0

试试这个。

$bind = array(
       'prefix' => "".$prefix."catalog_product_bundle_option_value", 
       'option_Id' => $eachOption->getData('option_id'), 
      ); 

//Open Database Conenction 
$write = Mage::getSingleton("core/resource")->getConnection("core_write"); 

$query("SELECT title FROM :prefix Where option_id = :option_Id"); 

$selectOptionID = $write->query($query, $bind); 

以上未经测试。如果它不工作尝试这一点。

+0

感谢分享代码,但我并不期待这段代码,我想如何通过使用magento模块从该表中获取数据。我的编码工作正常,但我不安全。所以你能帮我 –

+0

我不明白你想要你想要做什么?解释它多一点大声笑 –

+0

现在的数据是通过使用数据库连接,如 - $写=法师:: getSingleton(“核心/资源”) - > getConnection(“core_write”);我希望一切都将通过使用magento模块像Mage :: getModel('catalog/product') - > load($ optionId); –

相关问题