function addfacultyAction() { if ($this->getRequest()->isPost()) { $data = $this->getRequest()->getPost(); $db = new Application_Model_DbTable_DbDept(); $faculty_id = $db->AddNewFaculty($data); print_r(Zend_Json::encode($faculty_id)); exit; } }
public function addAction() { if ($this->getRequest()->isPost()) { $_data = $this->getRequest()->getPost(); try { $_dbmodel = new Application_Model_DbTable_DbDept(); $_major_id = $_dbmodel->AddNewMajor($_data); unset($formdata); $return = array('major_id' => $_major_id, "succ" => "ការបញ្ចូលដោយជោគជ័យ"); print_r(Zend_Json::encode($return)); exit; } catch (Exception $e) { Application_Model_DbTable_DbUserLog::writeMessageError($e->getMessage()); } } }