_init('aw_hdu3/ticket', 'id'); } public function updateCustomerEmailByWebsiteId($newEmail, $oldEmail, $websiteId) { $writeAdapter = $this->_getWriteAdapter(); $tableName = Mage::getSingleton('core/resource')->getTableName('aw_hdu3/ticket'); $storeIds = Mage::app()->getWebsite($websiteId)->getStoreIds(); $bind = array('customer_email' => new Zend_Db_Expr('"' . $newEmail . '"')); $where = array('customer_email = ?' => $oldEmail, '`store_id` IN (?)' => $storeIds); $writeAdapter->update($tableName, $bind, $where); } }