public function executeDelete(sfWebRequest $request){ Doctrine::getTable('User') ->findBy('id', $request->getParameter('id')) ->delete(); $this->redirect('SOME/PAGE'); $this->setTemplate(false); }Doctrine simplify our CRUD operations, here we just give Id of the record to be deleted and use delete() method or Doctrine to remove that record.
Wednesday, January 12, 2011
Symfony Doctrine Delete Row
Author: Originative
| Posted at: 8:08 PM |
Filed Under:
code samples,
Doctrine tutorial,
php tutorial,
symfony tutorial
|
![](http://www.blogger.com/img/icon18_email.gif)
![](http://www.blogger.com/img/icon18_edit_allbkg.gif)
In this tutorial we will delete a Row from database using Doctrine, lets do it with a simple example
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment