Example #1
0
 public function delete(Gyuser_Model_Plans $obj)
 {
     $table = $this->getDbTable();
     $where = $table->getAdapter()->quoteInto('id = ?', $obj->getId());
     $result = $table->delete($where);
     return $result;
 }
Example #2
0
 public function plansdeleteajaxAction()
 {
     try {
         $request = $this->getRequest();
         if ($this->getRequest()->isPost()) {
             $mapper = new Gyuser_Model_PlansDataMapper();
             $Obj = new Gyuser_Model_Plans();
             $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;
     }
 }