Hi James
I'll paste the code I use..
$string = search string entered in the text box.
#
// REPLACE SPACES FOR MULTIWORD SEARCH
$string = str_replace(" ","%",$string);
$db->query("SELECT title,description FROM files WHERE (title LIKE
'%
> The input from the search form is $searchtext. The Returned
> Search data is
> $searchdata.
>
>
> $sql = "SELECT searchdata FROM table WHERE searchdata LIKE
> '%$searchtext'";
> $result = @mysql_query($sql, $connection)
> or die (mysql_error());
>
> $num = mysql_num_rows($result);
>
> $x
I am trying to write a little search script to search a mysql db.
I would like to highlight the search words for the displayed results, like
sourceforge etc...
After a little help, I have got it to hightlight when searching for one
word. The problem is if I do a search for more than one word it
3 matches
Mail list logo