Hi, i am fairly experienced with php/mysql although havent used fulltext much and my current problems are driving me crazy! Cant find the cause or any documentation to explain it.
I am running mysql 5.0 with myisam
I started having problems with a complex search system (date section working perfectly, strings bring errors) so i stripped the core code out into a script as simple as i could make and got the same probs.
my table has fulltext enabled on the "name" and "desc" columns and currently has 5 rows, one of which contains the word "queen" in both title and desc
<?php
include("../db/eventsdb.php"); -----Calls database connection info-------
$query = "SELECT * FROM calendar WHERE MATCH(name, desc) AGAINST('queen')";
$result = mysql_query($query, $eventsdb);
$num_events = mysql_num_rows($result);
echo("$num_events");
while($row = mysql_fetch_array($result)){
$day = $row['day'];
echo("$day");
}
?>
From all the documentation i can find this code seems fine but it keeps bringing up the errors below and not returning any results.
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/content/k/o/h/html/dbtest/calendar/test.php on line 7
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/content/k/o/h/html/dbtest/calendar/test.php on line 9
Any ideas?