I am having a heck of a time laying this out. Maybe a second set of eyes can assist.
We have:
1 text field - users can enter anything, titled "Searchbox"
4 database tables:
placement_primarytech = holds skill titles
placement_candidate = holds all candidate information
placement_position = shows open positions available at the time
placement_candidatetech = cross-reference table for placement_primarytech and placement_candidate
Scenario:
User enters "C++" for a skill a candidate must have.
Result page pulls back every candidate with C++ listed in their resume.
The 3 tables I primarily want to work with are placement_primarytech, placement_candidate and placement_candidatetech; this is only good for a SKILL search so far, and not a name search.
The query in question:
//THIS IS SEARCHING BY SKILL ONLY!
$sql = "SELECT Technology.PrimaryTechID, placement_candidatetech.PrimaryTechID
FROM placement_candidatetech,placement_primarytech AS Technology
WHERE Technology.PrimaryTechnology LIKE '%C%'
AND placement_candidatetech.PrimaryTechID = Technology.PrimaryTechID";
//echo $sql;
$result = mysql_query($sql);
while($row=mysql_fetch_array($result)) {
echo $row['PrimaryTechID'] . "<BR>";
}
I still don't get the results back correctly, first off.
Second, I need to be able to cross-reference between placement_candidate.CandidateID and placement_candidatetech.CandidateID.