function insertDistrictAction() { //At callecteral when click client if ($this->getRequest()->isPost()) { $data = $this->getRequest()->getPost(); $db_district = new Other_Model_DbTable_DbDistrict(); $district = $db_district->addDistrictByAjax($data); print_r(Zend_Json::encode($district)); exit; } }
function addDistrictAction(){ if($this->getRequest()->isPost()){ $data = $this->getRequest()->getPost(); $db_district = new Other_Model_DbTable_DbDistrict(); $rows = $db_district->addDistrictByAjax($data); // array_unshift($rows, array ( 'id' => -1, 'name' => 'បន្ថែមអ្នកទទួលថ្មី') ); print_r(Zend_Json::encode($rows)); exit(); } }