欧美日韩精品在线,国内精品久久久久久久久,一级毛片恃级毛片直播,清纯唯美亚洲综合欧美色

PHP中常用的幾個(gè) mysql 語(yǔ)句_PHP教程

編輯Tag賺U幣
教程Tag:暫無(wú)Tag,歡迎添加,賺取U幣!

推薦:怎樣通過(guò)PHP連接MYSQL數(shù)據(jù)庫(kù)、創(chuàng)建數(shù)據(jù)庫(kù)、創(chuàng)建表
通過(guò)PHP連接MYSQL數(shù)據(jù)庫(kù) conn = mysql_connect(localhost,root,password) or die(無(wú)法連接數(shù)據(jù)庫(kù)); mysql_select_db(table ,conn) or die (找不到數(shù)據(jù)源); ----------------------------------------------------------------------- 通過(guò)PHP創(chuàng)

PHP中常用的幾個(gè) mysql 語(yǔ)句
顯示數(shù)據(jù)庫(kù)或表:
show databases;//然后可以u(píng)se database_name;
show tables;
更改表名:
alter table table_name rename new_t;
添加列 :
alter table table_name add column c_n column attributes;
刪除列:
alter table table_name drop column c_n;
創(chuàng)建索引:
alter table c_table add index (c_n1,c_n2);
alter table c_table add unique index_name(c_n);
alter table c_table add primary key(sid);
刪除索引:
alter table c_table drop index c_n1;
更改列信息:
alter table t_table change c_1 c_1 varchar(200);
alter table t_table modify 1 c_1 varchar(200);
insert插入語(yǔ)句:
insert into table_name (c_1,c_2)
values ('x1',1);
update語(yǔ)句:
update table_name set c_1 =1 where c_2=3;
刪除數(shù)據(jù)庫(kù)或者表:
drop table table_name;
drop database database_name;//使用mysql_drop_db()可以刪除的.
 

分享:如何實(shí)現(xiàn)文件上傳的程序源碼
如何實(shí)現(xiàn)文件上傳 ? HTML HEAD TITLE文件上傳界面/TITLE /HEAD BODYTABLECENTER ? if(UploadAction){ UploadAction=0; TimeLimit=60; /*設(shè)置超時(shí)限制時(shí)間默認(rèn)時(shí)間為 30s,設(shè)置為0時(shí)為不限時(shí) */ set_time_limit(TimeLimit); If((Upfile != none) (Upfile !=

來(lái)源:模板無(wú)憂//所屬分類:PHP教程/更新時(shí)間:2010-05-03
相關(guān)PHP教程