Home >Database >Mysql Tutorial >高级材料_MySQL

高级材料_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-01 14:01:461071browse

下面是一个简单的php连接mysql数据库进行数据分页显示的模版.可以按注释说明信息进行修改,里面的sql语句是可以自己改的.

  注意分析和观察里面相关分页部分的代码的书写和实现的方式.

    $link = mysql_connect('localhost', 'root', '') or die('mysql database connect error');
  mysql_select_db('your database') or die('the selected database is not exist');
  ?>
  //这里插入你的html代码,
    $sql = 'select count(*) count from your_table';
  $result = mysql_query($sql) or die(mysql_errno().": ".mysql_error()."n");
  $rs=mysql_fetch_object($result);
  $recountCount = $rs->count;
  $show = 20;
  $totalPage = ceil($recountCount/$show);
  $page = (isset(

高级材料 - 站长学院

  • 首页
  • 互联网软件
  • IDC产品
  • 站长交易
  • 项目外包
  • 商业信息
  • 招聘
  • 公司库
  • 站长商城
  • 资 讯
  • 下 载
  • 学 院
  • 工 具
  • 论 坛

视频教程 常用手册 常用广告代码 js特效代码

站长学院 >> 网站开发技术教程 >> mysql教程  >> 高级材料

高级材料

2009-2-7 21:18:00查看学习心得

{GetProperty(Content)}

Statement:
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