Home > php教程 > php手册 > body text

Php+SqlServer实现分页显示

WBOY
Release: 2016-06-13 12:41:45
Original
1245 people have browsed it



$id=@mssql_connect("ddy","sa"," ") or die("连接不上");
$db=mssql_select_db("ddy",$id);
$query="select * from lr00 order by lr0012 desc";
$result=mssql_query($query);
if($result):
if($tt==""){
$nopa=0;}
else $nopa=$tt;
$gg=mssql_num_rows($result);
echo $gg;
$k=0;
$i=0;
$dd=mssql_fetch_array($result);
if(!$dd){echo '到底了';}
while($dd&&$nopaif($nopa>=$gg) $nopa=$gg;
@mssql_data_seek($result,$nopa);
$dd=@mssql_fetch_array($result);
if($dd){$nopa++;$i++;
echo "
";
echo $dd[1]; }
}
endif;
?>


>下一页}?>


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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!