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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.