We were using PHP 4.0.6 and we upgraded to PHP 5.0.3. I am getting the following error:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in F:\wwwroot\home\myName\evtSearchPage.php on line 171
$query = "select * from event where Month like '%".$slMonth."%' And Year like '%".$year."%' ORDER BY Day";
$result = mysql_query($query);
$num_results = mysql_num_rows($result);
@ $db = mysql_connect("localhost", "username", "password");
if (!$db) {
echo "Error: Could not connect to database. Please try again later.";
exit;
}
mysql_select_db("alumni");
maybe problem is not with these lines, maybe with the query that you send db, paste it here code here and also look at this link http://bugs.mysql.com/bug.php?id=4391