$books_sql .= "SELECT *, MATCH (title) AGAINST ('$keywords') AS score FROM books WHERE MATCH (title) AGAINST ('$keywords') ORDER BY SCORE desc";
Right now I just have two rows in my table - one of which whose title is “some boring book”.
When I set $keywords to ‘some’ or ‘boring’, for example, I get no rows returned. Do I need to put in more rows if I want to test out my search function?
although im in no way an expert but i would try something like this
$var = @$_GET['query'] ; //or whatever you have named it in your search form
$trimmed = trim($var);
$query = "select * from table where 1_field like \"%$trimmed%\"
order by 1_field";