thnx for the reply
Snark1994
out put was "Resource id #5".
and now i changed my code a bit actual there was problem with my other code where i was getting input from previous page.
and i also changed the word AS RELAVENCE. i am using "As score" now... any how thanks for pointing out the error i will remember it for the next tym
now I am getting my desired out put but still along with that output
resourceid #5 is coming on a side..
heres my new code that is giving right output..but resourceid #5 along with it!
Code:
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, gender, maritalStatus, typeofWorkPosition, preferCity) AGAINST ('$industry $gender $maritalStatus $jobTitle $stationBase' IN BOOLEAN MODE) AS score
FROM membership_form
WHERE MATCH(industry, gender, maritalStatus, typeofWorkPosition, preferCity) AGAINST ('$industry $gender $maritalStatus $jobTitle $stationBase' IN BOOLEAN MODE)";
// echo $query;
$result = mysql_query($query);
echo $result;
if(!$result) {
echo mysql_error()."<br>$query<br>";
}
if(mysql_num_rows($result)>0)
{
while($row = mysql_fetch_array($result)) {
$memberNo = $row['memberNo'];
?>
HOPE you got my point what I am trying to ask!!
and about using Boolean mode... you are right about that... but i am using it here to give preference to some words( in match clause) AS in my if conditions I have used + and - signs to those words that must be included in search and words that have less priority relatively.
this is what I Know about using Boolean mode.. I can b wrong here..