i think you didn't get my problem right ...
i had clearly mentioned in my problem that i want a "AND" match and not a "OR".
if i use your query i get candidates with either skill 1 or skill 2.
i want a candidate whose is having both the skills i,e skill 1 and Skill 2.
and not those who are having Skill 1 or Skill 2.
When we join tables we do it row by row ... so using a or is simple ...
but i am matching a single entry in Table 1 to Multiple entries in Table 2.
i,e 11 and n1 ...
My Table Structure:
ApplicantTab:
ApplicantCode ApplicantName
1000 Danny
1001 Guru
ApplicantSkillTab:
ApplicantCode SkillCode
1000 1
1000 2
1000 3
1001 1
$query = "find a person with both skills
1,2";
(join the tables such a way that i get a candidate with both the skills)
i,e my expeted result is
ApplicantCode
1000
Any Comments ....