function getPage(){
return $this->page;
}
function getMess($error){//定制消息
echo"<center>$error</center>";
exit;
}
}
$pg=new Pages();
$pg->getConnect("lei","sa","star");
$pg->getTotal("select count(*) as total from xs"); //连学生表求总数
$pg->getList("select xs_name from xs order by xs_id",8,$page);
if($pg->getNums()!=0){
for($i=0;$i<$pg->getNums();odbc_fetch_row($pg->dList),$i++);//同上
}
$i=0;
while(odbc_fetch_row($pg->dList)){
$name=odbc_result($pg->dList,"xs_name");
echo $name."<br>";
if($i==$pg->getOnepage()){//跳出循环
break;
}
$i++;
}
echo$pg->getFanye();
?>
return $this->page;
}
function getMess($error){//定制消息
echo"<center>$error</center>";
exit;
}
}
$pg=new Pages();
$pg->getConnect("lei","sa","star");
$pg->getTotal("select count(*) as total from xs"); //连学生表求总数
$pg->getList("select xs_name from xs order by xs_id",8,$page);
if($pg->getNums()!=0){
for($i=0;$i<$pg->getNums();odbc_fetch_row($pg->dList),$i++);//同上
}
$i=0;
while(odbc_fetch_row($pg->dList)){
$name=odbc_result($pg->dList,"xs_name");
echo $name."<br>";
if($i==$pg->getOnepage()){//跳出循环
break;
}
$i++;
}
echo$pg->getFanye();
?>
| 对此文章发表了评论 |
