hiii ALL!!
I have to match/compare fields of one table with the fields of another table. basically m i have to search a record from another tables using some fields of a different table.
for exmple I have two tables.
Table 1: newjobs
table 2: employer form
Table 1 newjobs contains (Job Id, job title, industy...etc)
Table2 employer form contains( same fields as above but with a bit different names)
i have to check whether records of new job matches with that of employer form.
I am applying full text search... match().. and against()... queries..
but it always show no result..
heres the query m writing....
<?
$jobTitle = $_POST['jobTitle'];
$industry = $_POST['industry'];
$stationBase = $_POST['stationBase'];
$gender = $_POST['gender'];
$maritalStatus = $_POST['maritalStatus'];
mysql_select_db("a2z");
if((!$jobTitle) || ($jobTitle == "")) { $jobTitle = ""; } else { $jobTitle = "+(".$jobTitle.")"; }
if((!$industry) || ($industry == "")) { $industry = ""; }
if((!$stationBase) || ($stationBase == "")) { $stationBase = ""; } else { $stationBase = "+(".$stationBase.")"; }
if((!$gender) || ($gender == "")) { $gender = ""; }
if((!$maritalStatus) || ($maritalStatus == "")) { $maritalStatus = ""; }
$query = "SELECT *,
MATCH(industry, typeofWorkPosition, preferCity, spouse, gender) AGAINST ('$jobTitle $industry $stationBase $gender $maritalStatus' IN BOOLEAN MODE) AS RELAVENCE
FROM membership_form
WHERE MATCH(industry, typeofWorkPosition, preferCity, spouse, gender) AGAINST ('$jobTitle $city $industry $stationBase $gender $maritalStatus' IN BOOLEAN MODE)";
//echo $query;
$result = mysql_query($query);
echo $result;
if(!$result) {
echo mysql_error()."<br>$query<br>";
}
if($row=mysql_num_rows($result) > 0) {
echo $row;
}
else echo "sorryyyyyyyyy";
?>
pleaseeeeeee somebody tell me wats wrong with this.. I must be missing something really important.. do i have to use JOINS???
any help would be appreciated...!!!