Welcome Guest [Log In] [Register]
Add Reply
Php/sql Help
Topic Started: Apr 6 2009, 12:54 PM (282 Views)
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
Offline Profile Quote Post Goto Top
 
Darksorrow131

If I understood correctly,
Code:
 

SELECT Person_tbl.Person_Name, Skill_Tbl.Skill_Name, Learning_Style.Learning_Name
FROM Person_tbl
INNER JOIN Person_Learning ON Person_tbl.Person_ID = Person_Learning.Person_ID
INNER JOIN Learning_style ON Person_Learning.Learning_ID = Learning_Style.Learning_ID
INNER JOIN Skill_Learning ON Learning_style.Skill_ID = Skill_Learning.Learning_ID
INNER JOIN Skill_Tbl ON Skill_Learning.Skill_ID = Skill_Tbl.Skill_ID
WHERE Learning_ID = <insert what you want here>

untested though.
Edited by Darksorrow131, Apr 6 2009, 07:48 PM.
(let loop () (loop))
((lambda (x) (x x)) (lambda (x) (x x)))
(let ((k #f)) (call/cc (lambda (cc) (set! k cc)) (k))
((call/cc call/cc) (call/cc call/cc))

-- Infinite loops are awesome! --
Tell me if you have other awesome infinite loops!
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Web-Based Programming Support · Next Topic »
Add Reply

Banner and Logo by TheKeith