Zend DB inserting relational data
Posted
by
Wimbjorno
on Stack Overflow
See other posts from Stack Overflow
or by Wimbjorno
Published on 2012-09-04T08:49:17Z
Indexed on
2012/09/04
9:38 UTC
Read the original article
Hit count: 176
zend-framework
|zend-db
I'm using the Zend Framework database relationships for a couple of weeks now. My first impression is pretty good, but I do have a question related to inserting related data into multiple tables. For a little test application I've related two tables with each other by using a fuse table.
+---------------+ +---------------+ +---------------+
| Pages | | Fuse | | Prints |
+---------------+ +---------------+ +---------------+
| pageid | | fuseid | | printid |
| page_active | | fuse_page | | print_title |
| page_author | | fuse_print | | print_content |
| page_created | | fuse_locale | | ... |
| ... | | ... | +---------------+
+---------------+ +---------------+
Above is an example of my DB architecture
Now, my problem is how to insert related data to two separate tables and insert the two newly created ID's into the fuse table at the same time. If someone could could maybe explain or give me a topic related tutorial. I would appreciate it!
© Stack Overflow or respective owner