Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use the PHP paging function

Shulou Source: shulou.com Published: 2022-06-01 04:53:48 10月03日 Update

This article will explain in detail how to use the PHP paging function. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.

PHP paging function

/ / paging function function splitlist ($HALT,$LRLIST,$ECHOCNT,$paper,$table,$where,$page_id,$userid) {global $splitstr,$sumcnt;if ($paper== "| | $sumcnt==") {$query = "select count (*) as num from $table $where"; $result = mysql_query ($query); $row = mysql_fetch_array ($result); $sumcnt=$row ["num"]; if ($sumcnt==0) {nerror ("News has not been selected for this edition!");} $paper=1;} $sumpaper= ($sumcnt-$sumcnt%$ECHOCNT) / $ECHOCNT If (($sumcnt%$ECHOCNT)! = 0) $sumpaper+=1;if ($sumpaper==1 & & $HALT==0) return ($where); $enwhere=base64_encode (base64_encode ($where)); if (($LRLIST*2+1))

< $sumpaper){if(($paper-$LRLIST) < 2){$tract=1;$sub=$LRLIST*2+1;}else if(($paper+$LRLIST) >

= $sumpaper) {$tract=$sumpaper- ($LRLIST*2); $sub=$sumpaper;} else {$tract=$paper-$LRLIST;$sub=$paper+$LRLIST;}} else {$tract=1;$sub=$sumpaper;} $uppaper=$paper-1;$downpaper=$paper+1;$startcnt= ($paper-1) * $ECHOCNT;$where.= "limit ${startcnt}, ${ECHOCNT}"; if ($tract > 1) {$splitstr= "[]"; else $splitstr.= "> >]"; return ($where) }? > this is the end of the article on "how to use the PHP paging function". I hope the above content can be helpful to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

Tags: Function article more good practical content article news knowledge reference help related choice Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno MariaDB Shulou Tech Info macOS Huawei