=$maxRows){ $offset=$_GET['offset']; } } if($_GET['action']=='bottom'){ if($maxRows%$rowsOfPage==0){ //整页 $offset=$maxRows-$rowsOfPage; }else{ //非整页 $offset=$maxRows-$maxRows%$rowsOfPage; //20 10 20-10 25-25%10 20 } } }else{ //第一次进入,偏移量为0 $offset=0; } $queryString="select * from user_70 limit $offset,$rowsOfPage"; $rs=mysqli_query($link,$queryString); //用循环语句,从数据集中读出每一条记录 echo "
学号 | 姓名 | 班级 | 性别 | 出生日期 | 选课 | 籍贯 | 操作 | ||
".$row['name']." | "; echo "|||||||||
新增 | 首页 | 上一页 | 下一页 | 尾页 |