Zend Framework Database: Delete Query Style
Zend Framework Database Step By Step Tutorial - Part 10: Like insert and update, Zend framework have other option for delete query. You can use this style, and i am sure you will be like.
$DB->delete('user', 'id = 3');
Ok, try to update your delAction become like this:
public function delAction()
{
$params = array('host' =>'localhost',
'username' =>'root',
'password' =>'admin',
'dbname' =>'zend'
);
$DB = new Zend_Db_Adapter_Pdo_Mysql($params);
$request = $this->getRequest();
$DB->delete('user', 'id = '.$request->getParam('id'));
$this->view->assign('title','Delete Data');
$this->view->assign('description','Deleting succes');
$this->view->assign('list',$request->getBaseURL()."/user/list");
}
Oke, now, you are ready to read more about Zend Framework query style at Zend Framework manual guide.

