I need to retrieve data from a mysql table based on search criteria. then I want to grab the corresponding Ids
from another table to retrieve more data which will be posted on a search results page. Hence, I am getting information from 1 table and then retrieving corresponding information from another table, ID is primary key. Here is the code:
Code: Select all
//[color=#4040FF]search input[/color]
$query = "SELECT * FROM js_profile WHERE category = '$category' && degree = '$degree' && years_exp = '$years_exp' && work_time = '$work_time' && available = '$available'";
$result = mysql_query($query) or die(mysql_error());
//[color=#FF0000]how do I get all IDs from above query to retrieve corresponding ID from the table below?[/color]
query = "SELECT * FROM js_resume WHERE ???"
Please enlighten this novice.
Thanks in advance,
Batoe