Jump to content

Search Not working


dlyles

Recommended Posts

Hi all,

 

I am using the below coding for a full text search.  It works fine on my other search page, but it's not workign here.  Any suggestions?

I pasted the sql in phpmyadmin and got no results, however I KNOW that there's matching data.

   
  case "search": 
    searchForm(); 
    echo '<font size=3 face=arial>Search Results:</font><br />'; 
     
    $searchstring = mysql_escape_string($_GET['words']); 
    switch($_GET['mode']) 
    { 
      case "normal": 
        $sql = "SELECT *,  
               MATCH(shelf)  
               AGAINST ('$searchstring') AS score FROM parts 
               WHERE MATCH(shelf)  
               AGAINST ('$searchstring') ORDER BY score DESC"; 
      break; 
       
      case "boolean": 
        $sql = "SELECT *,  
               MATCH(shelf)  
               AGAINST ('$searchstring' IN BOOLEAN MODE) AS score FROM parts  
               WHERE MATCH(shelf)  
               AGAINST ('$searchstring' IN BOOLEAN MODE) ORDER BY score DESC"; 
      break; 

Link to comment
https://forums.phpfreaks.com/topic/48947-search-not-working/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.