>> Hi All,
>> I have a mysql database table that includes 5 fields for
>> skills, ie s1 ... s5. If the person has a skill then the field has a Y
>> if not then it has a N. I've made a search form that has 5 tick boxes
>> and on submit the form is passed to a php script.
>> What I want is, if s1 is selected, everybody that has skill1
>> is produced. If s1 and s3 are selected everyone that has both these
>> skills is produced etc. So if someone has s1, s2, s3 and s4 and I do a
>> search for everyone that has s2 and s3 they should appear but they
>> don't. I can see why but can't see how to do it.
>> From the form I get 5 variables $s1 ... $s5, so if boxes 1 and
>> 3 are ticked I get $s1=Y $S2=N $s3=Y $s4=N and $s5=N. I then use a
>> select query select * from skills where s1='$s1' and s2='$s2' and
>> s3='$s3' and s4='$s4' and s5='$s5' But this will give me ONLY those
>> that have s1 and s3 and miss everyone that has those 2 skills and
>> I can get the correct answer by manually running select * from
>> skills where s1='Y' and s2='Y' but, short of coding a select
>> query for every combination of all 5 skills, I can't see how to get
>> the results I want.
>> Can anyone give me a hint, please ?