Home > Backend Development > PHP Tutorial > Desktop Center (4) Data Display_PHP Tutorial

Desktop Center (4) Data Display_PHP Tutorial

WBOY
Release: 2016-07-13 17:31:19
Original
791 people have browsed it

The last step is to display.
The following program needs to be called through parameters.
For example, php(as the current mainstream development language).php(as the current mainstream development language)?jpg=jpg
The jpg behind is the table name . Remember it is necessary, otherwise it will not run and a program error will be displayed.
You can change the program below. This will make it more beautiful.

以下是源程序:

显示


MySQL(和PHP搭配之最佳组合)_connect("localhost","用户名","密码") or die("无法联接数据库!");
$query="SELECT id,url,mess,fromx,url1,mess1,fromx1,url2,mess2,fromx2,url3,mess3,fromx3 from $jpg " ;
$result=MySQL(和PHP搭配之最佳组合)_db_query("elong",$query); //执行查询
$num=MySQL(和PHP搭配之最佳组合)_numrows($result);
$page=round($page);
$pagesize=4;
if ($page==0){
$page=1;}
else{
$page=$page;}
$pagecount=($num)/$pagesize;
$pagecount=ceil($pagecount);
?>
printf("首页",$php(做为现在的主流开发语言)_SELF,1);
printf(" 前页",$php(做为现在的主流开发语言)_SELF,$page-1);
}else{
?> 首页 前页 }
?>

printf(" 后页",$php(做为现在的主流开发语言)_SELF,$page+1);
printf(" 尾页",$php(做为现在的主流开发语言)_SELF,$pagecount);
}else{?> 后页 尾页 页次:/

if ($num<>0){
$pp=0;
for($ipage=0;$ipage<$pagesize;$ipage++){
$i=($page-1)*$pagesize+$ipage;
if($i < $num) {
$id=MySQL(和PHP搭配之最佳组合)_result($result,$i,"id");
$url=MySQL(和PHP搭配之最佳组合)_result($result,$i,"url");
$mess=MySQL(和PHP搭配之最佳组合)_result($result,$i,"mess");
$fromx=MySQL(和PHP搭配之最佳组合)_result($result,$i,"fromx");
$url1=MySQL(和PHP搭配之最佳组合)_result($result,$i,"url1");
$mess1=MySQL(和PHP搭配之最佳组合)_result($result,$i,"mess1");
$fromx1=MySQL(和PHP搭配之最佳组合)_result($result,$i,"fromx1");
$url2=MySQL(和PHP搭配之最佳组合)_result($result,$i,"url2");
$mess2=MySQL(和PHP搭配之最佳组合)_result($result,$i,"mess2");
$fromx2=MySQL(和PHP搭配之最佳组合)_result($result,$i,"fromx2");
$url3=MySQL(和PHP搭配之最佳组合)_result($result,$i,"url3");
$mess3=MySQL(和PHP搭配之最佳组合)_result($result,$i,"mess3");
$fromx3=MySQL(和PHP搭配之最佳组合)_result($result,$i,"fromx3");
$pp=$pp+1;
       ?>










}
}
}
?>

  Pagination
  

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/509079.htmlTechArticleThe last step is to display. The following program needs to be called with parameters. For example, php (as the current mainstream development language) .php (as the current mainstream development language) ?jpg=jpg What follows...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template