
May 5th, 2003, 01:25 AM
|
|
|
|
Join Date: Apr 2007
Location: west lafayette, ohio, usa
Posts: 9
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
how do i get my full text search to work?
$query = "SELECT * FROM products WHERE MATCH(item_name, item_desc) AGAINST ('%".$_REQUEST["search_query"]."%') ORDER BY id LIMIT " . $_REQUEST["start"] . ", $number";
//$query = "SELECT * FROM products WHERE item_desc LIKE '%".$_REQUEST["search_query"]."%' OR item_name LIKE '%".$_REQUEST["search_query"]."%' OR item_price LIKE '%".$_REQUEST["search_query"]."%' ORDER BY id LIMIT " . $_REQUEST["start"] . ", $number";
$sql = MySQL_query($query);
$result=mysql_query($query) or die("MySQL Error: ".mysql_errno().": ".mysql_error());
$numOfRows = mysql_num_rows($result);
of course the Like works but when i use my match / against in the query, the page still works, but the results dont show up.
[moved to SQL help by xs0]
|