PDA

View Full Version : SQL again


learning110
05-03-2005, 09:51 PM
I have three tables

entertainer skills skill_no
entertainer_no skill_no skill_no
name entertainer_no skill_type
cost

county

** I want to query the database so i can type in a skill type i.e juggeling and it brings back all the entertainers names, cost etc that can juggel. Iv tried lots of inner joins etc but keep getting really weird results.

I tried making the query in access to see if it would give me any ideas but no luck. I'v added it if its of help to anyone.


SELECT entertainer.name, entertainer.cost, entertainer.county, skill_description.skill_type
FROM skill_description INNER JOIN (entertainer INNER JOIN skill ON entertainer.Entertainer_no=skill.entertainer_no) ON skill_description.skill_no=skill.skill_no
WHERE (((skill_description.skill_type)="juggeling"));

Thanks alot

Velox Letum
05-03-2005, 11:38 PM
SELECT entertainer.name, entertainer.cost, entertainer.county, skill_no.skill_type
FROM skill_no INNER JOIN (entertainer INNER JOIN skills ON entertainer.Entertainer_no=skills.entertainer_no) ON skill_no.skill_no=skills.skill_no
WHERE (((skill_no.skill_type)="juggling"));

Based upon your table design I was successfully able to execute this query and return a row with the the entertainer's name, cost, county, and their skill.

Spookster
05-04-2005, 12:28 AM
Why did you post this in the PHP forum when we have a MySQL and other databases forums?

Moving thread...