예제 #1
0
 public function getInterestRate($id)
 {
     try {
         $table = $this->getDbTable();
         $select = $table->select();
         $select->from($table, array('id', 'rate'));
         $select->where('id = ?', $id);
         $resultSet = $table->fetchAll($select);
         $entries = array();
         $entry = new Gyuser_Model_Interests();
         foreach ($resultSet as $row) {
             $entry = new Gyuser_Model_Interests();
             $entry->setId($row->id);
             $entry->setRate($row->rate);
             $entries[] = $entry;
         }
         return $entry;
     } catch (Exception $e) {
         return $e;
     }
 }
예제 #2
0
 public function interestdeleteajaxAction()
 {
     try {
         $request = $this->getRequest();
         if ($this->getRequest()->isPost()) {
             $mapper = new Gyuser_Model_InterestsDataMapper();
             $Obj = new Gyuser_Model_Interests();
             $Obj->setId($request->id);
             $this->_helper->layout->disableLayout();
             $this->_helper->viewRenderer->setNoRender();
             $result = $mapper->delete($Obj);
             if ($result) {
                 echo $result;
             } else {
                 echo "f";
             }
         }
     } catch (Exception $e) {
         echo $e;
     }
 }