have a search script that I have inputted at the home of my site and works correctly but with the following script:
$sql = "SELECT pd_id, pd_name, pd_more, pd_more2,
MATCH(pd_name, pd_more, pd_more2)
AGAINST ('$searchstring' IN BOOLEAN MODE) FROM tbl_product
WHERE MATCH(pd_name, pd_more, pd_more2)
AGAINST ('$searchstring' IN BOOLEAN MODE) ORDER BY pd_name DESC";
}
$result = mysql_query($sql) or die (mysql_error());
while($row = mysql_fetch_assoc($result))
{
echo "<a href='categories.php?c=0&p=". $row['pd_id']. "'>".stripslashes(htmlspecialchars($row['pd_name'])).'</a><br />';
}
A message saying 'query is empy' is displayed and cancels the rest of my html page. But if i remove 'or die (mysql_error());' then i get the following warning.
'Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result' but the rest of the page now loads correctly.
How do i overcome this problem im having?
Any help will be cool.