Hi Guys
I am researchin on the internet about how to define relationships between tables using php?
Basically I have say:
Job Table:
ID Name
---------
1 Manager
2 Developer
3 Analyst
Skill Table:
ID Name
----------
1 Java
2 C
3 C#
And I want to create the following table:
Job ID Skill ID
-------------
1 2
1 3
1 1
2 1
2 2
So by referencing the ID, I want to display the corresponding names so according to table above, the jod id 1 refers to manager and to do this job you need Java, C and C#.
Is this possible?
Thank you.
Linking Tables using PHP
Moderator: General Moderators
-
nishmgopal
- Forum Contributor
- Posts: 101
- Joined: Tue Mar 03, 2009 9:38 am
- jayshields
- DevNet Resident
- Posts: 1912
- Joined: Mon Aug 22, 2005 12:11 pm
- Location: Leeds/Manchester, England
Re: Linking Tables using PHP
You need to use joins, or you could get away with doing it with a simple SELECT query.
Search around for many-to-many relationships and SQL, it's nothing to do with PHP.
Search around for many-to-many relationships and SQL, it's nothing to do with PHP.