directly manage tables
piaoling 2011-07-12 13:26:19
$query = 'SELECT *'
.' FROM '.Mage::getModel('core/config_data')->getTablePrefix().'sales_order_status_state AS soss'
.' WHERE soss.state = ? AND soss.status = ?';
$row = Mage::getSingleton('core/resource')->getConnection('core_read')->query($query, array($state, $status))->fetch();
if( ! $row) {
$this->_fault('state_status_not_correspond', Mage::helper('sales')->__('Status and state do not correspond.'));
}
$row = Mage::getSingleton('core/resource')->getConnection('core_read')->query($query, array($state, $status))->fetchAll();
$row = Mage::getSingleton('core/resource')->getConnection('core_write')->query($query, array($state, $status));
发表评论(评论将通过邮件发给作者):