亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

How to change it so that the data is displayed on the page in reverse order, that is, the latest data is displayed at the front (code on the Internet)
肆意。
肆意。 2019-03-30 10:48:16
0
2
1433
<?php
//分頁的函數(shù)
function news($pageNum = 1, $pageSize = 5)
{
$array = array();
// $coon = mysqli_connect('rm-bp108931c0786t58eko.mysql.rds.aliyuncs.com','jjadmin','jj960820-COM','table_jjf');
$coon = mysqli_connect('localhost','root','96jj0820com','shuju');
mysqli_set_charset($coon, "utf8");
// limit為約束顯示多少條信息,后面有兩個(gè)參數(shù),第一個(gè)為從第幾個(gè)開始,第二個(gè)為長度
$rs = "select * from news limit " . (($pageNum - 1) * $pageSize) . "," . $pageSize ;
$r = mysqli_query($coon, $rs);
while ($obj = mysqli_fetch_object($r)) {
$array[] = $obj;
}
mysqli_close($coon,"table_jjf");
return $array;
}
//顯示總頁數(shù)的函數(shù)
function allNews()
{
// $coon = mysqli_connect('rm-bp108931c0786t58eko.mysql.rds.aliyuncs.com','jjadmin','jj960820-COM','table_jjf');
$coon = mysqli_connect('localhost','root','96jj0820com','shuju');
mysqli_set_charset($coon, "utf8");
$rs = "select count(*) num from news"; //可以顯示出總頁數(shù)
$r = mysqli_query($coon, $rs);
$obj = mysqli_fetch_object($r);
mysqli_close($coon,"table_jjf");
return $obj->num;
}
@$allNum = allNews();
@$pageSize = 5; //約定每頁顯示幾條信息
@$pageNum = empty($_GET["pageNum"])?1:$_GET["pageNum"];
@$endPage = ceil($allNum/$pageSize); //總頁數(shù)
@$array = news($pageNum,$pageSize);
?>


肆意。
肆意。

reply all(1)
秋香姐家的小書童

1. SQL statement plus sorting You can sort by time or by auto-incrementing ID

2. I don’t see your website template and can’t guide you to output the information to the page

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template