mysql/php
我可以让分页工作。但是在第二页它只列出了三个结果。其余页面没有显示结果。我在做什么错?
//$result=mysql_query("select count(*) from users WHERE level > 14");
$result=mysql_query("select count(*) from users WHERE level > 14 ORDER BY uid ASC LIMIT 200");
//$result=mysql_query("SELECT *, COUNT(level) FROM users GROUP by level AND NOT COUNT(*) < 15");
$row=mysql_fetch_row($result);
$tr=$row[0];
$rpp=10;
$pn=1;
echo mysql_result($result, 0);
if(isset($_GET['pn']))
{
$pn=$_GET['pn'];
}
$tp=($tr/$rpp);
if($tr%$rpp>0)
{
$tp++;
}
$from=(($pn-1)*$rpp)+1;
$to=($pn)*($rpp);
//$result=mysql_query("select * from users where uid between $from and $to HAVING level > 14 ");
$result=mysql_query("select * from users where (uid between $from and $to) AND level > 14 ORDER BY uid ASC LIMIT 200");
//$result=mysql_query("select * from users WHERE (uid between $from and $to) AND NOT level < 14");
while($row=mysql_fetch_row($result))