I could do it, but I´m stuck with the update!
For the insert I´m able to do it:
$db = new News();
$insert = $db->fetchNew();
$insert ->setFromArray((array)$this);
$insert->save();
It works, but for the update I need to do this:
$data = array('name' => $this->getRequest()->getPost('name'));
$db->update($data,$where);
Is there other solution than create the array and add the values?
Thanks.
--
View this message in context: http://zend-framework-community.634137.n4.nabble.com/Automatic-transform-and-save-the-POST-data-tp2331163p2332502.html
Sent from the Zend DB mailing list archive at Nabble.com.
没有评论:
发表评论