Puneet Arora
asked on
How to display n -n relationship in php : Many to many relationship
If I have following tables
Many to many relationship
Category A
ID , CategoryName
CategoryB
ID_CategorB , FK_CategoryA, CategoryName
Third Table Relationship Table
Relation
ID ,ID_CategoryB
How can I show the values in "select " box
Many to many relationship
Category A
ID , CategoryName
CategoryB
ID_CategorB , FK_CategoryA, CategoryName
Third Table Relationship Table
Relation
ID ,ID_CategoryB
How can I show the values in "select " box
ASKER
Thanks for the reply :
I want to show it in select box , then uses these multiple values
to select some more in the Category C table , In php do I need to simply use for loop
to get all the values and show in "select option box " and use java script to transfer
it to input box with multiple values ? Question is How to ?
I want to show it in select box , then uses these multiple values
to select some more in the Category C table , In php do I need to simply use for loop
to get all the values and show in "select option box " and use java script to transfer
it to input box with multiple values ? Question is How to ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ID_A -- PK
CategoryName
Table_CategoryB
ID_B -- PK
CategoryName
Table_A_B <-- this is known as bridge table
ID_A -- FK
ID_B -- FK
You can make write SQLs you need from these table like:
Open in new window