欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

php访问数据库分页显示

程序员文章站 2022-05-18 09:57:27
...
1、前言

对于mysql数据库,为便于学习等,新安装的mysql中含有一个叫做world的数据库,该数据库含有一些信息,本文以此为实验素材。本文参考了php经典编程265例。

2、上代码

host=$host;			$this->user=$user;			$this->pwd=$pwd;			$this->db=$db;			$this->connect();		}		function connect(){			$this->con=mysql_connect($this->host,$this->user,$this->pwd);			mysql_select_db($this->db,$this->con);			mysql_query("SET NAMES UTF-8");		}	};?>
"; echo ""; echo ""; }?>
CountryLauguage
CountryCode Language Isofficial Percentage
$r[0] $r[1] $r[2] $r[3]

Head ";if($page>2){ echo "Pre ";}if($pageNext ";}echo "End ";?>


3、实验截图