|
|||
|
Hi everyone, I am fairly new to the zend framework as well as php.
I am creating a website that for simplicity could be described as a blog which has Sections which contain Categories which contain Entries. lets say I have a URL in the following form: http://localhost/Some_Section/A_Category/An_Entry I have taken care of the routing and get back 3 parameters $section $category $entry My database contains 3 tables: 'Section', 'Category' and 'Entry' which i have created models for by extending Zend_Db_Table. The Entry table contains a foreign key to the Category id. The Category table contains a foreign key to the Section id. in order to get the proper data I need to do a join on the 3 tables but I do not want to be forced to specify all the column names after the join... especial since all of the columns are uniquely named. I have found that this can be done with the joinUsing() function but I cant use it on 3 tables. this is what i have used to join 2 tables in the entries model. could anyone help me figure out how to get the same type of thing done with 3? PHP Code:
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|