继承人的错误:
警告:mysql_num_rows() 期望参数 1 是资源,在第 36 行的 /home/rspslabe/public_html/Toplist/index.php 中给出 null
这是代码:
<?
$maxdate = time() - ($MaxDays * 86400);
if ($p == 0)
{
$site_info = mysql_query("SELECT
$Members.title AS title, $Members.url AS url, count(*) AS hits,
avg($IPLogg.vote) AS avrating,
$Members.siteid AS id FROM
$IPLogg,$Members WHERE $Members.siteid = $IPLogg.siteid AND $IPLogg.time > '$maxdate'
GROUP BY $Members.siteid ORDER BY hits DESC, avrating DESC");
}
else if ($p == 1)
{
$site_info = mysql_query("SELECT
$Members.title AS title, $Members.url AS url, count(*) AS hits,
avg($IPLogg.vote) AS avrating,
$Members.siteid AS id FROM
$IPLogg,$Members WHERE $Members.siteid = $IPLogg.siteid AND $IPLogg.time > '$maxdate'
GROUP BY $Members.siteid ORDER BY avrating DESC, hits DESC");
}
$site_num = mysql_num_rows($site_info);
if ($f == "")
$f = 0;
$maxsites = $f + $TopListSize;
if ($site_num > $maxsites)
$site_num = $maxsites;
$i = $f;
它本身的实际网页是这样的:http ://rspslab.com/Toplist/
谢谢,如果有人可以帮忙!:)