public function UpdateBalanceByReject(Gyuser_Model_Providers $obj) { try { $table = $this->getDbTable(); /* $prov = $this->GetProviderById($obj); $previousBalance = floatval($prov->getBalance()); $rejBalance = floatval($obj->getBalance()); $currentBalance = $previousBalance - $rejBalance; */ $set = array('balance' => $obj->getBalance()); $where = array('id = ?' => $obj->getId()); $result = $table->update($set, $where); return $result; } catch (Exception $e) { echo $e; } }