> 백엔드 개발 > PHP 튜토리얼 > 想在分页上添首页和尾页

想在分页上添首页和尾页

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
풀어 주다: 2016-06-13 11:25:59
원래의
1009명이 탐색했습니다.

想在分页上加首页和尾页

<?php<br />  extract($_REQUEST);<br />  $n=0; <br />  $query=mysql_query("select count(*) as sm from jiaoshi");<br />  mysql_query("set names 'GB2312'");<br />  $row=mysql_fetch_array($query);<br />  $count=$row['sm'];<br />    if(empty($offset))<br />              {$offset=0;}<br />	/*echo  $offset;*/<br />   $where = (! isset($surplus)) ? '' : " where surplus='$surplus'";<br />   $query=mysql_query("select * from jiaoshi $where order by id asc limit $offset,$list_num") or die ("fail");<br />   mysql_query("set names 'GB2312'");<br />   <br />   while($row=mysql_fetch_array($query)){<br />        if(($n%2)!='0'){<br /> 	  echo "<tr bgcolor=#CDE6C7>";}<br />	  else{<br />	  echo "<tr bgcolor=#FFFFFF>";<br />	  }<br />	  	  <br />	if($row['surplus']==0)<br />	     $ss="不可选";<br />	else $ss="可选"; <br />     echo"<br />	<td   height='22' class='STYLE1'> <div align='center'> ".$row['id']." </div></td><br />	<td   height='22' class='STYLE1'> <div align='center'> ".$row['subject']." </div></td><br />    <td   height='22' class='STYLE1'> <div align='center'> ".$row['teacher']." </div></td><br />    <td   height='22' class='STYLE1'> <div align='center'> ".$row['zhicheng']." </div></td><br />    <td   height='22' class='STYLE1'> <div align='center'> ".$row['number']." </div></td><br />	<td   height='22' class='STYLE1'> <div align='center'> ".$row['xuehao']." </div></td><br />	<td   height='22' class='STYLE1'> <div align='center'>".$ss."</div></td><br />	<td   height='22' class='STYLE1'> <div align='center'> <a href=xiangxiziliao.php?id=".$row['id'].">查看</a></div></td><br />  </tr> ";<br />   $n++;<br />   }<br />   <br />   ?>
로그인 후 복사

관련 라벨:
본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
인기 튜토리얼
더>
최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿