How do I handle this problem?
I have 2 tables:
1. RESUME
2. SKILLS
A field in RESUME includes an unorganized set of skills, written out like so:
Over 20 years of Unix experience. Oracle 9i experience. Skills in HTML, PHP, and SQL.
I decided to create the table 'SKILLS' and give it an ID field, and a NAME field, with name being things like 'html', 'unix', 'oracle', etc.
I've set up the explode for the field in RESUME:
$sql_skills = "SELECT Candidate_ID, Section_ID, Section_Value
FROM resume
WHERE Candidate_ID = '". $row['Candidate_ID'] ."'
AND Section_ID = '1'";
$result_skills = mysql_query($sql_skills) or die(mysql_error());
//echo $sql_skills . "<BR>";
$row_skills = mysql_fetch_array($result_skills);
$skills2 = $row_skills['Section_Value'];
$skills = explode(" ", $skills2);
echo print_r($skills) . "<P>";
Once the skills are exploded from the field in RESUME, I then want to match them up (case insensitive) to the keywods in the SKILLS table.
I starting testing something like this, but it doesn't work:
$sql_keyskills = "SELECT id, name
FROM skills";
$result_keyskills = mysql_query($sql_keyskills);
print_r($result_keyskills);
$key = array_search($sql_keyskills, $array); // $key = 2;
Any idea how I can best match up the exploded strings to the fields in my SKILLS table?