求助!如何实现CSDN里的分页显示! select * from table limit i,j 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 看一下这个,可能对你有帮助http://expert.csdn.net/Expert/FAQ/FAQ_Index.asp?id=4637 $PAGE_SIZE = 20;$Rs1 = mysql_query("select count(*) as cnt from $Tables where $conditions ;");$Tmp = mysql_fetch_array($Rs1);$All_Cnt = $Tmp["cnt"];$All_Cnt = 1;$Page_Cnt = ceil($All_Cnt/$PAGE_SIZE);if( !isset($Page) || $Page<1 )$Page = 1;if( $Page>$Page_Cnt ) $Page = $Page_Cnt;mysql_free_result( $Rs1 );unset($Rs1);$Page_Start = $Page * $PAGE_SIZE - 1 ;$Rs2=mysql_query("select $Field_List from $Table where $Conditions limit $Page_Start,$PAGE_SIZE ;");// Start print Page//Show headerwhile($R_Arr=mysql_fetch_array($Rs2)){ //Do print print_r($R_arr);}mysql_free_result($Rs2);unset($Rs2);// echo Page_List;print("最新:" . $All_Cnt ." 篇 ");for($I=1;$I<=$Page_Cnt;$I++){ if($I==$Page) print(" " .$I ); else print(" <a href='" . $SElF ."&Page=" .$I ."'>" .$I ."</a>");}// show footer MS SQL Server不支持limit指令,怎么办? to: lionelfeng(小乐) 对于mssql有几个函数可以实现的。我记得论坛里有相关的讨论 怎样实现对几个数据库并行查询 用dreamweaver8编写PHP与MySQL用什么编码好?(utf8或gb2312)编程的老大进来介绍下经验 php session 丢失 如何去掉用户提交留言里的空行?(立即结帖) 求一正则表达式,源码中取所有域名列表 使用构建的SQL类库,如果我是两个数据库怎么办? 取出值最低且记录条数最少的记录 刚刚做的网站,大家批批 网站源码应该放在主机的什么地方? php问题 这种布局类型的PHP论坛哪儿有下?急 一个除了我都能得分的问题!怎样取得URL!
http://expert.csdn.net/Expert/FAQ/FAQ_Index.asp?id=4637
$PAGE_SIZE = 20;$Rs1 = mysql_query("select count(*) as cnt from $Tables where $conditions ;");
$Tmp = mysql_fetch_array($Rs1);
$All_Cnt = $Tmp["cnt"];
$All_Cnt = 1;
$Page_Cnt = ceil($All_Cnt/$PAGE_SIZE);
if( !isset($Page) || $Page<1 )$Page = 1;
if( $Page>$Page_Cnt ) $Page = $Page_Cnt;
mysql_free_result( $Rs1 );unset($Rs1);
$Page_Start = $Page * $PAGE_SIZE - 1 ;$Rs2=mysql_query("select $Field_List from $Table where $Conditions limit $Page_Start,$PAGE_SIZE ;");
// Start print Page//Show headerwhile($R_Arr=mysql_fetch_array($Rs2)){ //Do print
print_r($R_arr);
}
mysql_free_result($Rs2);unset($Rs2);
// echo Page_List;
print("最新:" . $All_Cnt ." 篇 ");
for($I=1;$I<=$Page_Cnt;$I++){
if($I==$Page)
print(" " .$I );
else
print(" <a href='" . $SElF ."&Page=" .$I ."'>" .$I ."</a>");
}// show footer
to: lionelfeng(小乐)
对于mssql有几个函数可以实现的。
我记得论坛里有相关的讨论