Page 1 of 1

PHP/SQL Query help

Posted: Mon Apr 06, 2009 11:48 am
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

Re: PHP/SQL Query help

Posted: Mon Apr 06, 2009 12:13 pm
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.

Re: PHP/SQL Query help

Posted: Mon Apr 06, 2009 12:22 pm
by temidayo
Your database schema can actually use some work.

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