PHP/SQL Query help

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
nishmgopal
Forum Contributor
Posts: 101
Joined: Tue Mar 03, 2009 9:38 am

PHP/SQL Query help

Post by nishmgopal »

Hi..

I am having difficulty in joining my tables together to get the relevant information. Basically I have 5 tables:

Skill_Tbl:
--------
Skill_ID(Int 11)
Skill_Name

Person_tbl:
-----------
Person_ID(Int 11)
Person_Name

Learnin_Style:
------------
Learning_ID (INT 11)
Learning_Name (VARCHAR)

Person_Learning:
--------------
ID (INT 11-AI)
Person_ID
Learning_ID

Skill_Learning:
------------
ID (INT 11-AI)
Skill_ID
Learning_ID

And basically I want to show the following information via some sort of a query:

I want to display all the names of the people and skill and style name where Learning ID is the same.


Is this possible?

Thanks
User avatar
jayshields
DevNet Resident
Posts: 1912
Joined: Mon Aug 22, 2005 12:11 pm
Location: Leeds/Manchester, England

Re: PHP/SQL Query help

Post by jayshields »

Well I think you need to re-think your schema, and naming conventions (inc. spelling). It is possible to do what you've asked, but in the amount of time it would take to type it out you could normalise your schema properly.
temidayo
Forum Contributor
Posts: 109
Joined: Fri May 23, 2008 6:17 am
Location: Nigeria

Re: PHP/SQL Query help

Post by temidayo »

Your database schema can actually use some work.

See help here: http://www.databaseanswers.org/
Post Reply