Home > php教程 > php手册 > 关于PHP的分页代码

关于PHP的分页代码

WBOY
Release: 2016-06-13 10:00:00
Original
1031 people have browsed it

读取数据记录的分页代码
if(!$whichpage)

$notepage=1;
}
else
{
$notepage=$whichpage;
}
$noterecs=0;
$pagesize=10;
$bbsconn=mysql_connect("localhost","root");
mysql_select_db("rainwindy",$bbsconn);
$bbsresult=mysql_query("select * from bbs order by id desc",$bbsconn);
$rsnum=mysql_num_rows($bbsresult);
$pagecount=ceil($rsnum/$pagesize);
mysql_data_seek($bbsresult,($notepage-1)*10);
?>



     
     
     
     
     
     
    
while(($bbsrow=mysql_fetch_array($bbsresult)) && ($noterecs{
?>

     
     
     
编号 用户名 发表人 文章标题 发表时间
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template