Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-30-2008, 12:00 AM
Junior Member
 
Join Date: Jun 2008
Posts: 1
Default Displaying parent / children , one to many relationship.

Hey everyone,
I have this problem and I hope someone had the same and can enlight me.
I want to display a kind of listing ... which would look like something like that.

Parent1
Children1
Children2
Parent2
Children3
Parent3
children4
Children5



I read the manual and so far i've got those 2 tables.

class ParentTable extends Zend_Db_Table
{
protected $_name = 'parent';
protected $_primary = 'parent_id';
protected $_sequence = true;
protected $_dependentTables = array('children');
}

class ChildrenTable extends Zend_Db_Table {
protected $_name = 'children';
protected $_primary = 'children_id';
protected $_sequence = true;
}

Both tables have a name field (children_name and parent_name) for displaying purposes.

My problem is that I know how to display all the Parents and all the childrens separately but I have no idea how I could display like I want to.

I'm new to MVC and I really don't know where I should work this out...
In the controller or the model ?

If anyone has an idea, I thank him in advance.

Kaheena.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 09:35 PM.