I have just started with Zend Framework, so might be a bit of a silly question coming up.
I have a Form with 5 Checkboxes. A User can click on as many checkboxes as needed. This gets entered into the Database. (1:n)
This all works fine. But now I am gotten to the part where a User can Edit the Post. The Checkbox gets shown as well as which once are active. But how do I update this now?
The Rest of the Post Update works fine, collecting the Data and send an update:
$this->getDbTable()->update($data, array('post_id = ?' => $id));
Now I want to update the Checkboxes, the 1:n Relationship. But how would I do that if I for example had 4 Checkboxes active but after the update I want only 3 active? Should I delete all entries first and than do a normal insert or is there a trick to do it?
Hope someone can help. Thanks !