




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、第一課 數(shù)據(jù)庫創(chuàng)建與數(shù)據(jù)表作業(yè): 1,創(chuàng)建數(shù)據(jù)庫studentdb,創(chuàng)建該數(shù)據(jù)庫的三張表,錄入數(shù)據(jù)。 2,使用SQL語句完成創(chuàng)建數(shù)據(jù)庫studentdb2,創(chuàng)建該數(shù)據(jù)庫的三張表 -create database studentdb2; use studentdb2 go create table tab_student (學(xué)號(hào) int primary key, 姓名 char(10) not null, 性別 char(2), 出生日期 datetime null, 家庭住址 varchar(50) null ) 3,備份數(shù)據(jù)庫studentdb到e盤。第二課 數(shù)據(jù)庫增查刪改一、 還原數(shù)據(jù)庫s
2、tudentdb二、數(shù)據(jù)庫的增查刪改-指定studentdbuse studentdbgo-插入一條完整的學(xué)生信息-insert into tab_student-values (1005,'馬兵','男','1992-9-4','河南開封')-插入一條部分?jǐn)?shù)據(jù)的學(xué)生信息-sert into tab_student(學(xué)號(hào),姓名)-lues(1006,'李麗萍')-刪除學(xué)號(hào)1006的同學(xué)-delete -from tab_student-where 學(xué)號(hào)=1006-修改馬兵的性別為女-update tab_stude
3、nt-set 性別='女'-where 姓名='馬兵'-查詢所有學(xué)生的信息-select *-from tab_student-查詢學(xué)生的姓名和地址-select 姓名,家庭住址-from tab_student-查詢女同學(xué)信息-select * -from tab_student-where 性別='女'-查詢學(xué)生總?cè)藬?shù)-select count(*) as 學(xué)生人數(shù)-from tab_student-查詢學(xué)生姓名,課程名稱,成績(jī)-select 姓名,課程名稱,成績(jī)-from tab_student inner join tab_score o
4、n tab_student.學(xué)號(hào)=tab_score.學(xué)號(hào) - inner join tab_course on tab_course.課程編號(hào)=tab_score.課程編號(hào)-查詢學(xué)生姓名,課程名稱,成績(jī),按照從高到低的排序-select 姓名,課程名稱,成績(jī)-from tab_student inner join tab_score on tab_student.學(xué)號(hào)=tab_score.學(xué)號(hào) - inner join tab_course on tab_course.課程編號(hào)=tab_score.課程編號(hào)-order by 成績(jī) desc-統(tǒng)計(jì)每個(gè)同學(xué)的平均成績(jī)-select 學(xué)號(hào),avg
5、(成績(jī)) as 平均成績(jī)-from tab_score-group by 學(xué)號(hào)-統(tǒng)計(jì)每個(gè)同學(xué)的平均成績(jī)-select 姓名,avg(成績(jī)) as 平均成績(jī)-from tab_student inner join tab_score on tab_student.學(xué)號(hào)=tab_score.學(xué)號(hào)-group by 姓名-查詢課程名稱及該課程平均成績(jī),按平均成績(jī)從高到低顯示。select 課程名稱,avg(成績(jī)) as 平均成績(jī)from tab_course inner join tab_score on tab_course.課程編號(hào)=tab_score.課程編號(hào)group by 課程名稱orde
6、r by 平均成績(jī)第三課 Mysql數(shù)據(jù)庫及表操作一,mysqld.exe 服務(wù)器程序 mysql.exe 客服端程序 密碼root二,數(shù)據(jù)類型 數(shù)值型 5,-6;int,float 字符類型 "hello" char ,varchar 大塊文本 text 日期時(shí)間類型 "2009-9-4 23:3:6" datetime,date,time 三,1,創(chuàng)建數(shù)據(jù)庫 create database studentdb; 相關(guān)數(shù)據(jù)庫文件 C:Documents and SettingsAll UsersApplication Data MySQLMySQL S
7、erver 5.1data 隱藏文件夾,我的電腦-工具-文件選項(xiàng)-查看-勾選“顯示所有文件及文件夾” 2, 顯示數(shù)據(jù)庫 show databases; 3,刪除數(shù)據(jù)庫 drop database studentdb; 4,選用數(shù)據(jù)庫 use studentdb; 5,創(chuàng)建數(shù)據(jù)庫表 格式:create table if not exists 表名 (字段名 數(shù)據(jù)類型 not null| null default 默認(rèn)值 auto_increment primary key . ) create table tab_student (Id int primary key, name char(10
8、), sex char(2), birthday date null, address varchar(50) ); 6,顯示數(shù)據(jù)庫中的表 show tables; 7,查看表結(jié)構(gòu) show columns from tab_student; 8,表增加一個(gè)字段 alter table tab_student add telephone varchar(20); 9,修改表的一個(gè)字段 alter table tab_student id id int not null; 10,刪除表的一個(gè)字段 alter table tab_student drop telephone; 第四課 數(shù)據(jù)操作一
9、數(shù)據(jù)庫操作 1,創(chuàng)建數(shù)據(jù)庫 create database studentdb; 相關(guān)數(shù)據(jù)庫文件 C:Documents and SettingsAll UsersApplication Data MySQLMySQL Server 5.1data 隱藏文件夾,我的電腦-工具-文件選項(xiàng)-查看-勾選“顯示所有文件及文件夾” 2, 顯示數(shù)據(jù)庫 show databases; 3,刪除數(shù)據(jù)庫 drop database studentdb; 4,選用數(shù)據(jù)庫 use studentdb;二 數(shù)據(jù)表操作 5,創(chuàng)建數(shù)據(jù)庫表 格式:create table if not exists 表名 (字段名 數(shù)據(jù)類
10、型 not null| null default 默認(rèn)值 auto_increment primary key . ) create table tab_student (id int primary key, name char(10), sex char(2), birthday date null, address varchar(50) ); 6,顯示數(shù)據(jù)庫中的表 show tables; 7,查看表結(jié)構(gòu) show columns from tab_student; 8,表增加一個(gè)字段 alter table tab_student add telephone varchar(20);
11、 9,修改表的一個(gè)字段 alter table tab_student change id id int not null; 10,刪除表的一個(gè)字段 alter table tab_student drop telephone; 三 數(shù)據(jù)操作 11 增加數(shù)據(jù) insert into tab_student values(1001,"zhangsan","m","1993-9-2","henan luoyang"); insert into tab_student values(1002,"lisi&quo
12、t;,"m","1993-5-2","henan zhengzhou"); insert into tab_student(id,name,sex) values(1003,"wangying","f"); 12 簡(jiǎn)單查詢 select * from tab_student; select * from tab_student where id=1001; 13 修改數(shù)據(jù) update tab_student set address = "henane kaifeng" wh
13、ere name="lisi" 14 刪除數(shù)據(jù) delete from tab_student where address ="kaifeng" and name ="lisi" 作業(yè): 添加學(xué)號(hào)1008,名字為liping的女同學(xué)信息 顯示所有同學(xué)的姓名,家庭地址信息 把學(xué)號(hào)為1002的出生日期改為1996-4-5 刪除男同學(xué)的信息 第五課 使用phpmyadmin管理mysql數(shù)據(jù)庫使用phpmyadmin管理mysql數(shù)據(jù)庫一, 創(chuàng)建數(shù)據(jù)庫studentdb,創(chuàng)建三張表。 http:/localhost/phpmyadmin/
14、用戶名:root,密碼root 若有問題,工具-internet選項(xiàng)-常規(guī)-執(zhí)行刪除cookie,刪除文件二, 錄入數(shù)據(jù),增查刪改 1 增加數(shù)據(jù) insert into tab_student values(1001,"zhangsan","m","1993-9-2","henan luoyang"); insert into tab_student values(1002,"lisi","m","1993-5-2","henan zhengzh
15、ou"); 2 簡(jiǎn)單查詢 select * from tab_student; select * from tab_student where id=1001; 3 修改數(shù)據(jù) update tab_student set address = "henane kaifeng" where name="lisi" 4 刪除數(shù)據(jù) delete from tab_student where address ="kaifeng" and name ="lisi" 作業(yè): 添加學(xué)號(hào)1008,名字為liping的女同學(xué)
16、信息 顯示所有同學(xué)的姓名,家庭地址信息 把學(xué)號(hào)為1002的出生日期改為1996-4-5 刪除男同學(xué)的信息第六課 php操縱mysql數(shù)據(jù)庫使用php操縱mysql數(shù)據(jù)庫一、建立與MySQL數(shù)據(jù)庫服務(wù)器的連接<?php $link=mysql_connect("localhost","root","root"); echo $link."<br>" if(!$link) echo "數(shù)據(jù)庫服務(wù)器連接失敗!"."<br>" echo "錯(cuò)誤
17、編碼:".mysql_errno()."<br>"echo "錯(cuò)誤信息:".mysql_error();die(); echo "數(shù)據(jù)庫服務(wù)器連接成功!"."<br>"?>二、選擇要對(duì)其進(jìn)行操作的數(shù)據(jù)庫。 <?php $link=mysql_connect("localhost","root","root") or die("數(shù)據(jù)庫服務(wù)器連接失敗!"); echo "數(shù)據(jù)庫服務(wù)器連
18、接成功!"."<br>" mysql_select_db("studentdb",$link) or die("數(shù)據(jù)庫選擇失??!"); echo "數(shù)據(jù)庫選擇成功!"."<br>" ?>三、執(zhí)行相應(yīng)的數(shù)據(jù)庫操作,數(shù)據(jù)庫創(chuàng)建與刪除<?php $link=mysql_connect("localhost","root","root") or die("數(shù)據(jù)庫服務(wù)器連接失?。?quot;
19、); echo "數(shù)據(jù)庫服務(wù)器連接成功!"."<br>" mysql_query("create database studentdb",$link) or die("數(shù)據(jù)庫創(chuàng)建失??!"); echo "數(shù)據(jù)庫創(chuàng)建成功"."<br>" mysql_select_db("studentdb",$link) or die("數(shù)據(jù)庫選擇失敗!"); echo "數(shù)據(jù)庫選擇成功!"."<
20、;br>" mysql_query("drop database studentdb",$link) or die("數(shù)據(jù)庫刪除失?。?quot;); echo "數(shù)據(jù)庫刪除成功"."<br>" ?>第七課 php操縱數(shù)據(jù)庫表使用php操縱mysql數(shù)據(jù)庫一 ,對(duì)數(shù)據(jù)庫和表的操作<?php /連接數(shù)據(jù)庫服務(wù)器 $link = mysql_connect("localhost","root","root") or die(&qu
21、ot;數(shù)據(jù)庫服務(wù)器連接失敗!"); echo "數(shù)據(jù)服務(wù)器庫連接成功!"."<br>" /創(chuàng)建數(shù)據(jù)庫 mysql_query("create database studentdb",$link) or die("數(shù)據(jù)庫創(chuàng)建失敗!"); echo "數(shù)據(jù)庫創(chuàng)建成功!"."<br>" /選擇數(shù)據(jù)庫 mysql_select_db("studentdb",$link) or die("數(shù)據(jù)庫選擇失??!");
22、echo "數(shù)據(jù)庫選擇成功!"."<br>" /創(chuàng)建數(shù)據(jù)庫表 $sql = "create table tab_student(id int not null,name char(10),sex char(2),birthday date,address varchar(50)" mysql_query($sql,$link) or die("數(shù)據(jù)庫表創(chuàng)建失??!"); echo "數(shù)據(jù)表創(chuàng)建成功!"."<br>" /刪除數(shù)據(jù)庫表 mysql_query
23、("drop table tab_student") or die("刪除數(shù)據(jù)庫表失??!"); echo "刪除數(shù)據(jù)庫表!"."<br>" /刪除數(shù)據(jù)庫 mysql_query("drop database studentdb",$link) or die("數(shù)據(jù)庫刪除失??!"); echo "數(shù)據(jù)庫刪除成功!"."<br>" /斷開服務(wù)器連接 mysql_close($link) or die("斷開
24、服務(wù)器連接失敗!"); echo "斷開服務(wù)器連接成功!"."<br>" ?>二 查詢信息顯示到頁面<?php /連接數(shù)據(jù)庫服務(wù)器 $link = mysql_connect("localhost","root","root") or die("數(shù)據(jù)庫服務(wù)器連接失??!"); /選擇數(shù)據(jù)庫 mysql_select_db("studentdb",$link) or die("數(shù)據(jù)庫選擇失?。?quot;); /查詢
25、學(xué)號(hào)為1001的同學(xué)信息顯示到頁面 $result = mysql_query("select * from tab_student where id=1001",$link); $row =mysql_fetch_array($result); echo "學(xué)號(hào):".$row"id"."<br>" echo "姓名:".$row"name"."<br>" echo "性別:".$row"sex&quo
26、t;."<br>" echo "出生日期:".$row"birthday"."<br>" echo "家庭住址:".$row"address"."<br>" /斷開服務(wù)器連接 mysql_close($link) or die("斷開服務(wù)器連接失??!"); ?>第八課 php數(shù)據(jù)查詢及顯示一,在數(shù)據(jù)庫服務(wù)器創(chuàng)建數(shù)據(jù)庫studentdbhttp:/localhost/phpmyadmin二,在數(shù)據(jù)
27、庫里創(chuàng)建學(xué)生表tab_studentid intname char(10)sex char(2)birthday dateaddress varchar(50)三,學(xué)生表里添加測(cè)試數(shù)據(jù)四,設(shè)計(jì)查詢頁面select.html文件<body><form action="result.php" method="post">請(qǐng)輸入您要查詢的學(xué)號(hào):<input type="text" name="xuehao" /><br><input type="submit
28、" value="查詢" /><input type="reset" value="清除"/></form></body>五,編寫代碼,顯示查詢得到的信息result.php文件代碼<?php$xuehao=$_POST"xuehao"$link = mysql_connect("localhost","root","root") or die("數(shù)據(jù)庫連接失敗!");mysql
29、_select_db("studentdb",$link) or die("數(shù)據(jù)庫選擇失??!");$sql="select * from tab_student where id=$xuehao"$result=mysql_query($sql,$link);$row = mysql_fetch_array($result);if(!$row) echo "沒有該學(xué)生的信息!" die();echo "學(xué) 號(hào):".$rowid."<br>"echo "姓
30、 名:".$rowname."<br>"echo "性 別:".$rowsex."<br>"echo "出生日期:".$rowbirthday."<br>"echo "家庭住址:".$rowaddress."<br>"echo "<br>"."使用數(shù)字下標(biāo)顯示:"."<br>"echo "學(xué) 號(hào):"
31、;.$row0."<br>"echo "姓 名:".$row1."<br>"echo "性 別:".$row2."<br>"echo "出生日期:".$row3."<br>"echo "家庭住址:".$row4."<br>"?> 第九課 php數(shù)據(jù)添加一,在數(shù)據(jù)庫服務(wù)器創(chuàng)建數(shù)據(jù)庫studentdbhttp:/localhost/phpmyadmin二,
32、在數(shù)據(jù)庫里創(chuàng)建學(xué)生表tab_studentid intname char(10)sex char(2)birthday dateaddress varchar(50)導(dǎo)入導(dǎo)出可以備份和還原表,導(dǎo)入文件studentdb.sql,執(zhí)行還原了tab_student表三,學(xué)生表里添加測(cè)試數(shù)據(jù)四,設(shè)計(jì)頁面insert.html內(nèi)容:<body><form action="result.php" method="post"><h3>學(xué)生添加</h3><br>學(xué)號(hào):<input type="
33、text" name="id" /><br>姓名:<input type="text" name="name" /><br>性別:<input type="text" name="sex" /><br>出生日期:<input type="text" name="birthday" /><br>家庭住址:<input type="text&qu
34、ot; name="address"><br><input type="submit" value="提交" /><input type="reset" value="取消" /></form></body>result.php內(nèi)容:<?php/得到表單的信息$id= $_POST"id"$name= $_POST"name"$sex= $_POST"sex"$bi
35、rthday= $_POST"birthday"$address= $_POST"address"/如果信息不完善,退出if($id=""|$name="") die("學(xué)生信息不完善,添加失??!")."<br>"/連接數(shù)據(jù)庫服務(wù)器$link = mysql_connect("localhost","root","root")or die("數(shù)據(jù)庫服務(wù)器連接失敗");/選擇數(shù)據(jù)庫mys
36、ql_select_db("studentdb") or die("數(shù)據(jù)庫選擇失敗");/查詢是否存在該學(xué)號(hào)的學(xué)生信息,如果存在,退出$sql= "select id from tab_student where id=$id"$result=mysql_query($sql);$row = mysql_fetch_array($result);if($row) die("已經(jīng)存在該學(xué)生信息,添加失敗");/添加學(xué)生信息$sql="insert into tab_student values($id,
37、39;$name','$sex','$birthday','$address')"if(mysql_query($sql,$link) echo "學(xué)生添加成功!"."<br>"else echo "學(xué)生添加失敗"."<br>"?>第十課 php數(shù)據(jù)修改一,在數(shù)據(jù)庫服務(wù)器創(chuàng)建數(shù)據(jù)庫studentdbhttp:/localhost/phpmyadmin二,在數(shù)據(jù)庫里創(chuàng)建學(xué)生表tab_studentid intname ch
38、ar(10)sex char(2)birthday dateaddress varchar(50)導(dǎo)入導(dǎo)出可以備份和還原表,導(dǎo)入文件studentdb.sql,執(zhí)行還原了tab_student表三,學(xué)生表里添加測(cè)試數(shù)據(jù)四,頁面設(shè)計(jì)及代碼編寫1、conn.php 數(shù)據(jù)庫連接文件<?php$host= "localhost"$username="root"$pwd="root"$db="studentdb"$link=mysql_connect($host,$username,$pwd) ordie("
39、數(shù)據(jù)庫服務(wù)器連接失敗!");mysql_select_db($db,$link) or die("數(shù)據(jù)庫選擇失敗!");?>2、student_select.html學(xué)生信息查詢<body><form action="student_edit.php" method="post">請(qǐng)輸入要修改的學(xué)生學(xué)號(hào):<input type="text" name="id" /><br><input type="submit&qu
40、ot; value="確定" /><input type="reset" value="取消" /></form></body>3、student_edit.php 學(xué)生信息修改頁面<?php$id=$_POST"id"include "conn.php"$sql="select * from tab_student where id='$id'"$result=mysql_query($sql);$row=my
41、sql_fetch_array($result);if(!$row) die("查無此學(xué)生信息!");$id=$row"id"$name=$row"name"$sex=$row"sex"$birthday=$row"birthday"$address=$row"address"?><form action="student_update.php" method="post">要修改的學(xué)生信息如下:<br>學(xué)
42、號(hào):<?php echo $id?><br>姓名:<input type="text" name="name" value="<?php echo $name?>" /><br>性別:<input type="text" name="sex" value="<?php echo $sex?>" /><br>出生:<input type="text" nam
43、e="birthday" value="<?php echo $birthday?>" /><br>地址:<input type="text" name="address" value="<?php echo $address?>" /><br><input type="submit" value="確定" /><input type="reset" v
44、alue="取消" /></form></body>4、student_update.php信息修改頁面<?php$id=$_POST"id"$name=$_POST"name"$sex=$_POST"sex"$birthday=$_POST"birthday"$address=$_POST"address"include "conn.php"$sql="update tab_student set name=
45、'$name',sex='$sex',birthday='$birthday',address='$address' where id='$id'"$result=mysql_query($sql);if($result) echo "學(xué)生信息修改成功!"."<br>"else die("學(xué)生信息修失?。?quot;);$sql="select * from tab_student where id='$id'&quo
46、t;$result=mysql_query($sql);$row=mysql_fetch_array($result);echo "學(xué)號(hào):".$row"id"."<br>"echo "姓名:".$row"name"."<br>"echo "性別:".$row"sex"."<br>"echo "出生:".$row"birthday"."
47、;<br>"echo "地址:".$row"address"."<br>"?>第十一課 php數(shù)據(jù)刪除一,在數(shù)據(jù)庫服務(wù)器創(chuàng)建數(shù)據(jù)庫studentdbhttp:/localhost/phpmyadmin二,在數(shù)據(jù)庫里創(chuàng)建學(xué)生表tab_studentcreate table tab_student(id int primary key,name char(10),sex char(2),birthday date,address varchar(50)導(dǎo)入導(dǎo)出可以備份和還原表,導(dǎo)入文件student
48、db.sql,執(zhí)行還原了tab_student表三,學(xué)生表里添加測(cè)試數(shù)據(jù)四,頁面設(shè)計(jì)及代碼編寫1、conn.php 數(shù)據(jù)庫連接文件<?php$host= "localhost"$username="root"$pwd="root"$db="studentdb"$link=mysql_connect($host,$username,$pwd) ordie("數(shù)據(jù)庫服務(wù)器連接失敗!");mysql_select_db($db,$link) or die("數(shù)據(jù)庫選擇失??!"
49、);?>2、student_delete_form.html學(xué)生信息刪除頁面<body><form action="student_delete.php" method="get">請(qǐng)輸入要?jiǎng)h除的學(xué)生學(xué)號(hào):<input type="text" name="id" /><br><input type="submit" value="確定" /><input type="reset" va
50、lue="取消" /></form></body>3、student_delete.php學(xué)生信息刪除處理頁面<?php$id=$_GET"id"if($id="") die("學(xué)號(hào)不能為空!");include "conn.php"$sql="select * from tab_student where id=$id"$result=mysql_query($sql);$row=mysql_fetch_array($result);if
51、(!$row) die("無此學(xué)生信息!");$sql="delete from tab_student where id='$id'"if(mysql_query($sql) echo "學(xué)生刪除成功!"."<br>"else echo "學(xué)生刪除失敗!"."<br>"?>第十二課 數(shù)據(jù)的表格顯示一,在數(shù)據(jù)庫服務(wù)器創(chuàng)建數(shù)據(jù)庫studentdbhttp:/localhost/phpmyadmin二,在數(shù)據(jù)庫里創(chuàng)建學(xué)生表tab_st
52、udentcreate table tab_student(id int primary key,name char(10),sex char(2),birthday date,address varchar(50)導(dǎo)入導(dǎo)出可以備份和還原表,導(dǎo)入文件studentdb.sql,執(zhí)行還原了tab_student表三,學(xué)生表里添加測(cè)試數(shù)據(jù)四,頁面設(shè)計(jì)及代碼編寫數(shù)據(jù)的表格顯示<body><?php $link=mysql_connect("localhost","root","root"); mysql_select_db
53、("studentdb"); $sql="select * from tab_student" $result=mysql_query($sql);?><div align="center"><strong>學(xué)生信息</strong></div><table border="1" align="center"> <tr> <td><div align="center">學(xué)號(hào)&
54、lt;/div></td> <td><div align="center">姓名</div></td> <td><div align="center">性別</div></td> <td><div align="center">出生日期</div></td> <td><div align="center">家庭住址</div&
55、gt;</td> <td><div align="center">操作</div></td> </tr> <?php while($row=mysql_fetch_array($result) ?> <tr> <td><div align="center"><?php echo $row"id"?></div></td> <td><div align="
56、center"><?php echo $row"name"?></div></td> <td><div align="center"><?php echo $row"sex"?></div></td> <td><div align="center"><?php echo $row"birthday"?></div></td>
57、<td><div align="center"><?php echo $row"address"?></div></td> <td><div align="center"><a href="student_detail">詳情</a><a href="student_update">修改</a><a href="student_delete"
58、;>刪除</a></div></td> </tr> <?php ?></table> </body>第十三課 數(shù)據(jù)分頁顯示及操作一,在數(shù)據(jù)庫服務(wù)器創(chuàng)建數(shù)據(jù)庫studentdbhttp:/localhost/phpmyadmin二,在數(shù)據(jù)庫里創(chuàng)建學(xué)生表tab_studentcreate table tab_student(id int primary key,name char(10),sex char(2),birthday date,address varchar(50)導(dǎo)入導(dǎo)出可以備份和還原表,導(dǎo)入文
59、件studentdb.sql,執(zhí)行還原了tab_student表三,學(xué)生表里添加測(cè)試數(shù)據(jù)四,頁面設(shè)計(jì)及代碼編寫數(shù)據(jù)的分頁顯示(未完待續(xù))<body><?php $link=mysql_connect("localhost","root","root"); mysql_select_db("studentdb"); $sql="select * from tab_student" $result=mysql_query($sql); /結(jié)果記錄數(shù) $rows=mysql_num_
60、rows($result); /每頁的記錄數(shù) $pagesize=2; /總頁數(shù) $pagecount=ceil($rows/$pagesize); $pageno=$_GET"pageno" /$pageno表示當(dāng)前的頁號(hào) if(!isset($pageno)|$pageno<1) $pageno=1; if($pageno>$pagecount) $pageno=$pagecount; /計(jì)算當(dāng)前頁號(hào)顯示記錄的偏離量 $offset=($pageno-1)*$pagesize; /移動(dòng)結(jié)果集的指針 mysql_data_seek($result,$offse
61、t); ?><div align="center"><strong>學(xué)生信息</strong></div><table border="1" align="center"> <tr> <td><div align="center">學(xué)號(hào)</div></td> <td><div align="center">姓名</div></td
62、> <td><div align="center">性別</div></td> <td><div align="center">出生日期</div></td> <td><div align="center">家庭住址</div></td> <td><div align="center">操作</div></td> </tr> <?php /$i是當(dāng)前頁顯示記錄的計(jì)算器 $i=0; while($row=mysql_fetch_array($result) ?&
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 第2.6練 指數(shù)與指數(shù)函數(shù)(解析版)-2024年高考數(shù)學(xué)一輪復(fù)習(xí)精講精練寶典(新高考專用)
- 2022年北京市初三一模道德與法治試題匯編:遵守社會(huì)規(guī)則
- 2024人工智能法律倫理
- 2020-2021學(xué)年江蘇省南京外國(guó)語河西初級(jí)中學(xué)等三校七年級(jí)(下)期中數(shù)學(xué)試卷
- 衢州屋檐防水施工方案
- 2024年廣西地區(qū)中考滿分作文《給小廣的一封信》5
- 第1課 十字路口-認(rèn)識(shí)多圖層動(dòng)畫 教學(xué)設(shè)計(jì)-2023-2024學(xué)年遼師大版(2015)初中信息技術(shù)八年級(jí)下冊(cè)
- 合同范例和合同范例區(qū)別
- 代銷電器合同范例
- 可持續(xù)發(fā)展的工作實(shí)踐計(jì)劃
- 戰(zhàn)傷并發(fā)癥的護(hù)理
- 尼康D5200說明書簡(jiǎn)體中文
- 事業(yè)單位工作人員退休(職)登記表
- 前程無憂招聘測(cè)評(píng)題庫及答案
- 2024解析:第十章 浮力綜合應(yīng)用-基礎(chǔ)練(解析版)
- 【MOOC】社會(huì)調(diào)查與研究方法-北京大學(xué) 中國(guó)大學(xué)慕課MOOC答案
- 2024年下半年杭州市余杭區(qū)瓶窯鎮(zhèn)招考易考易錯(cuò)模擬試題(共500題)試卷后附參考答案
- 自身免疫性腦炎護(hù)理常規(guī)
- 2025年慢性阻塞性肺疾病全球創(chuàng)議GOLD指南修訂解讀課件
- 幼兒園小班健康公開課《笑一笑》課件
- 認(rèn)識(shí)晶體(完整版)課件
評(píng)論
0/150
提交評(píng)論