php - how to allow mutilple column search with fulltext search -


i'm trying implement fulltext search website , problems match() syntax not allowing use of multiple columns. can help?

here code:

// $sql = "select * tenders      inner join categories on categories.category_id=tenders.category_id      inner join provinces on provinces.province_id=tenders.province_id      match (details,category, province)          against('$searchterm' in natural language mode)";  $search_count = $db->query($search_sql);  //amount displayed per page $per_page = 1; //number of pages $pages = ceil($search_count->num_rows/$per_page); 

in browser, i'm getting error:

notice: trying property of non-object in c:\xampp\htdocs\dailytenders\search.php on line 39

how can solve this. have altered tables engine=myisam , fulltext on details, category , province columns.

in code have this:

$search_count = $db->query($search_sql); 

i think must instead:

$search_count = $db->query($sql); 

i used in past match function against multiple columns , worked good.


Comments