I have a form generated by Zend_Form
. How do I include the data in the database by Zend_Db_Table
in table with relationship type many-to-many?
Please see the code: http://pastebin.com/u3C6TQKi and image example:
First you should insert parent table. You can get insert row id. So insert child data with parent row id. It is best way. Also you can write single query and run it single time.