请帮助我解决指定的问题:
代码部分:
$result = mysql_query("SELECT *, UNIX_TIMESTAMP(eventdate) AS eventdate,
UNIX_TIMESTAMP(throughdate) AS throughdate FROM events ORDER BY eventdate where
id='$_GET[id];'");
// the above query is not working
if ( mysql_num_rows($result) == 0 ) {
print "<p>No events right now.</p>\n";
}
else {
$lasteventmonth = '';
while ($row = mysql_fetch_array($result)) {
$eventmonth="";
$eventmonth = date("F Y",$row['eventdate']);
if ($lasteventmonth != $eventmonth) {
print "<p style='font-size: 18px;'><b>$eventmonth</b></p>";
}
$lasteventmonth = $eventmonth;
showEvent($row);
}
}
?>
........................
........................//other codes
当代码评估如下:
警告:mysql_num_rows():在第 122 行的 C:\Users\Fagun\Desktop\UsbWebserver\Root\mapcal\mapcal.php 中,提供的参数不是有效的 MySQL 结果资源 目前没有事件。++++++++