ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

One To Many Relationship

June 14, 2012 2:24am

Subscribe [0]
  • #1 / Jun 14, 2012 2:24am

    tabboy

    24 posts

    Just starting on my first expression engine website and I have come up against this stumbling block.  This is the scenario…

    I want to be able to add a new band and associate a list of members to it. A band can have varying number of members so you can’t hard code a field for say drummer, guitarist in the band channel.  In a relational database this would straight forward just have a primary key to link both tables but I have no idea how to handle this in EE…

    Will a relationship as described in the User Guide accomplish this for me?  From what I understand from reading the documentation is it seems like the relationship is one to one and it won’t return multiple rows of data.. Does anyone have a real example they can provide to me of these relationships in action I am not following the one in the documentation?

    Also noticed the module called Playa by Pixel and Tonic.. Will this allow me to do what I want?

    I just need someone to point me in the right direction.

    Thanks in advance!

  • #2 / Jun 14, 2012 8:51am

    tabboy

    24 posts

    Ok I found some other posts and this one gave a better explanation of Relationships http://ellislab.com/forums/viewthread/212319/

    This is exactly what I was trying to achieve and relationships did it for me!

    You should include this in the documentation it makes much more sense of how to implement it.  Thanks mark186282 !

  • #3 / Jun 14, 2012 11:34am

    tabboy

    24 posts

    How the hell do I close this thread now ??? lol

  • #4 / Jun 14, 2012 8:31pm

    tabboy

    24 posts

    I solved my issue using reverse related entries, go ahead and close this… Cheers

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases