public function deleteAction() { $this->_helper->getHelper('layout')->disableLayout(); $this->_helper->getHelper('viewRenderer')->setNoRender(); $this->preProcessSession(); $request = $this->getRequest(); $result = 'RESULT_ERROR'; if ($request->isPost()) { $guid = $request->getPost('guid'); $ids = array(); $ids = Zend_Json::decode($guid); $pollingDb = new App_Model_Db_Table_Poll(); $pollingOptionDb = new App_Model_Db_Table_PollOption(); foreach ($ids as $pollId) { $pollingDb->delete(['guid=?' => $pollId]); $pollingOptionDb->delete(['pollGuid=?' => $pollId]); } $result = 'RESULT_OK'; } $this->getResponse()->setBody($result); }