This topic is locked

trying to understand master and detail table....

12/19/2012 9:12:05 AM
PHPRunner General questions
B
BrownCHiLD author

I can't seem to get a grasp of this, so forgive me for sounding noobish..
here are my tables
customers (customer data)

customer_groups (customer groups)

customer_groupings (this is the table for customer-group relations..
so basically customers may or may not belong to a group...

customer_groups table is not DIRECTLY related to CUSTOMERS, no direct relation... customer_groupings makes the groupings possible..
here's how it looks like

http://d.pr/i/eaxT
So i want to see customers list, w/ GROUPS they're involved in.. so 1 customer can have many groups it belongs to..
i'd like to be able to add or remove a customer to/from a group, in the CUSTOMERS view..
alternatively, i wish to view all GROUPS and all customers that belongs to each group.. and add /remove customers as i need..
so i've been at this for almost for hours.. <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=20430&image=1&table=forumtopics' class='bbc_emoticon' alt=':(' />
please help

Sergey Kornilov admin 12/19/2012

What you trying to describe are many-to-many relationship. Here is the article that explains how to setup this in PHPRunner:

http://xlinesoft.com/blog/2011/02/28/how-to-setup-many-to-many-relationships/