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

SQL Query help

Post by nishmgopal »

Hey guys, I just wanted some advise on what my sql query would like for the following:

I have two tables: Job_Table and Person_Table

Job_Table has:

j_name, skill, skill_weight

Person_table has:

p_name, skill, skill_score

I want to write a query where The skills in jobs are compared with the skills in person, and i want to display the person name only if all the skills are present in both... does this make sense?

thanks
tech603
Forum Commoner
Posts: 84
Joined: Thu Mar 19, 2009 12:27 am

Re: SQL Query help

Post by tech603 »

You could do something like this:

select p_name from Person_Table where skill = Job_Table.skill

This would return the names of the people when the skills match in both tables.

hope that helps

Matthew Vass
QA Anylist
mvass@hostmysite.com
http://www.hostmysite.com?utm_source=bb
Post Reply