Php paging code is simple. Php paging code: mysqli. func. phpnum_rows;} shut down database functionclosedb () {if (! Mysqli_close () {exit (close exception );}}? Paging implementation code php paging code simple implementation
Database operation code: mysqli. func. php
Num_rows;} // closes the database function closedb () {if (! Mysqli_close () {exit ('close exception') ;}}?>
Paging implementation code:
$ Pagenum) echo "script window. location. href = 'index. php 'script "; // calculate the start value of the page if ($ tmp =" ") {$ num = 0;} else {$ num = ($ tmp-1) * $ fnum;} // query statement $ SQL = "SELECT dg_id, dg_username FROM tb_user ORDER BY dg_id DESC LIMIT ". $ num. ", $ fnum"; $ result = doresult ($ SQL); // traverse the output while (! ! $ Rows = dolists ($ result) {echo $ rows ['dg _ id']. "". $ rows ['dg _ username']."
";}// Flip link for ($ I = 0; $ I <$ pagenum; $ I ++) {echo "". ($ I + 1 ). "" ;}?>
The page flip function is implemented. configure the structure of the database.
Database operation code: mysqli. func. php num_rows;} // closes the database function closedb () {if (! Mysqli_close () {exit (close exception) ;}}?> Code for implementing paging...