function adminsmsmessagelistAction() { $this->_helper->layout->setLayout("layout_admin"); $smsMessage = new SmsMessage(); $id = $this->_request->getParam('id'); if ($id) { $smsMessage->update(array("delete" => 1), 'id = ' . $id); $this->_helper->redirector("adminsmsmessagelist"); } $db = Zend_Registry::get('db'); $select = $db->select(); $select->from('sms_message', array('sms_message.*')); $select->where('sms_message.delete =0 '); $select->order('crdate desc'); $this->view->sms = $db->fetchAll($select); }