freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

phpmysql課堂匯總學(xué)習(xí)-資料下載頁

2025-03-23 00:33本頁面
  

【正文】 [username].br。//刪除會話變量,會話文件不被刪除//session_unset()。//刪除會話文件session_destroy()。$_SESSION=array()。echo 刪除會話后,用戶名:.$_SESSION[username].br。?三、更改會話標(biāo)示符?phpsession_start()。echo Old SID:.session_id().br。session_regenerate_id()。echo New SID:.session_id().br。?四、獲取和設(shè)置session名稱?phpsession_start()。echo session Name:.session_name().br。echo session SID:.session_id().br。echo a href=?.session_name().=.session_id().ex2頁面/a。??php// 啟動sessionsession_start()。echo 會話標(biāo)示符:.session_id().br。?五、編碼session數(shù)據(jù)及數(shù)據(jù)庫存放//創(chuàng)建存放session的數(shù)據(jù)庫表create database studentdb。use studentdb。create table usersession(id int not null auto_increment,sid char(32) not null,data text,primary key(id))。//把session內(nèi)容編碼后插入到數(shù)據(jù)庫表中?phpsession_start()。$_SESSION[username]=張三。$_SESSION[loggedon]=date(Ymd H:i:s,time()+8*60*60)。$sessionVars=session_encode()。$sid=session_id()。echo $sid.br。echo $sessionVars.br。mysql_connect(localhost,root,root)。mysql_select_db(studentdb)。$sql=insert into usersession(sid,data) values(39。$sid39。,39。$sessionVars39。)。mysql_query($sql)。?第十五課 session綜合應(yīng)用作業(yè): 教材p260,261,第7,8,11題一、編碼session數(shù)據(jù)及數(shù)據(jù)庫存放//創(chuàng)建存放session的數(shù)據(jù)庫表create database studentdb。use studentdb。create table usersession(id int not null auto_increment,sid char(32) not null,data text,primary key(id))。//把session內(nèi)容編碼后插入到數(shù)據(jù)庫表中?phpsession_start()。$_SESSION[username]=張三。$_SESSION[loggedon]=date(Ymd H:i:s,time()+8*60*60)。$sessionVars=session_encode()。$sid=session_id()。echo $sid.br。echo $sessionVars.br。mysql_connect(localhost,root,root)。mysql_select_db(studentdb)。$sql=insert into usersession(sid,data) values(39。$sid39。,39。$sessionVars39。)。mysql_query($sql)。?//通過session標(biāo)識號從數(shù)據(jù)庫表中查詢session內(nèi)容后,解碼輸出?phpsession_start()。$id=session_id()。mysql_connect(localhost,root,root)。mysql_select_db(studentdb)。$sql=select data from usersession where sid=39。$sid39。$result=mysql_query($sql)。$sessionVars=mysql_result($result,0,data)。session_decode($sessionVars)。echo 用戶名:.$_SESSION[username].br。echo 登錄時間:.$_SESSION[loggedon].br。?二,session綜合應(yīng)用bodyform method=get action= 用戶名:input type=text name=username /br密碼:input type=text name=password /brinput type=submit value=登錄 //form/body2,創(chuàng)建數(shù)據(jù)庫用戶表 use studentdb。 create table userauth( id int primary key auto_increment, name varchar(10) not null, username varchar(20) not null, password varchar(50) not null)?phpsession_start()。if(isset($_SESSION[name])) echo $_SESSION[name].,歡迎你回來!。else if(!isset($_GET[username])) header(Location:)。else{$username=$_GET[username]。 $password=$_GET[password]。 mysql_connect(localhost,root,root)。 mysql_select_db(studentdb)。 $sql=select name,username,password from userauth where username=39。$username39。 and password=39。$password39。 $result=mysql_query($sql)。 if(mysql_num_rows($result)==1) {$_SESSION[name]=mysql_result($result,0,name)。 $_SESSION[username]=mysql_result($result,0,username)。 $_SESSION[password]=mysql_result($result,0,password)。 echo $_SESSION[name].,你登錄成功了!.br。} else header(Location:)。 }? Mysql數(shù)據(jù)庫部分第一課 數(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é)號 int primary key, 姓名 char(10) not null, 性別 char(2), 出生日期 datetime null, 家庭住址 varchar(50) null ) 3,備份數(shù)據(jù)庫studentdb到e盤。第二課 數(shù)據(jù)庫增查刪改一、 還原數(shù)據(jù)庫studentdb二、數(shù)據(jù)庫的增查刪改指定studentdbuse studentdbgo插入一條完整的學(xué)生信息insert into tab_studentvalues (1005,39。馬兵39。,39。男39。,39。19929439。,39。河南開封39。)插入一條部分?jǐn)?shù)據(jù)的學(xué)生信息sert into tab_student(學(xué)號,姓名)lues(1006,39。李麗萍39。)刪除學(xué)號1006的同學(xué)delete from tab_studentwhere 學(xué)號=1006修改馬兵的性別為女update tab_studentset 性別=39。女39。where 姓名=39。馬兵39。查詢所有學(xué)生的信息select *from tab_student查詢學(xué)生的姓名和地址select 姓名,家庭住址from tab_student查詢女同學(xué)信息select * from tab_studentwhere 性別=39。女39。查詢學(xué)生總?cè)藬?shù)select count(*) as 學(xué)生人數(shù)from tab_student查詢學(xué)生姓名,課程名稱,成績select 姓名,課程名稱,成績from tab_student inner join tab_score on = inner join tab_course on =查詢學(xué)生姓名,課程名稱,成績,按照從高到低的排序select 姓名,課程名稱,成績from tab_student inner join tab_score on = inner join tab_course on =order by 成績 desc統(tǒng)計每個同學(xué)的平均成績select 學(xué)號,avg(成績) as 平均成績from tab_scoregroup by 學(xué)號統(tǒng)計每個同學(xué)的平均成績select 姓名,avg(成績) as 平均成績from tab_student inner join tab_score on =group by 姓名查詢課程名稱及該課程平均成績,按平均成績從高到低顯示。select 課程名稱,avg(成績) as 平均成績from tab_course inner join tab_score on =group by 課程名稱order by 平均成績第三課 Mysql數(shù)據(jù)庫及表操作一, 服務(wù)器程序 客服端程序 密碼root二,數(shù)據(jù)類型 數(shù)值型 5,6;int,float 字符類型 hello char ,varchar 大塊文本 text 日期時間類型 200994 23:3:6 datetime,date,time 三,1,創(chuàng)建數(shù)據(jù)庫 create database studentdb。 相關(guān)數(shù)據(jù)庫文件 C:\Documents and Settings\All Users\Application Data\ MySQL\MySQL Server \data 隱藏文件夾,我的電腦工具文件選項查看勾選“顯示所有文件及文件夾” 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] ..........
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1