php桌面中心(一) 創(chuàng)建數(shù)據(jù)庫
更新時(shí)間:2007年03月11日 00:00:00 作者:
這是小弟第一次寫文章。不知道能不能發(fā)布呀。。我把程序?qū)懗鰜硎窍胍蠹覅⒖家幌?。如果有哪位高手能改出更好的程序?nbsp;
請(qǐng)別忘了和我說一聲呀。 :P
源程序的演示頁面在elong.oso.com.cn/desk/
第一步創(chuàng)建數(shù)據(jù)庫:
我們就以OSO的數(shù)據(jù)庫為列說明一下。
先登入數(shù)據(jù)庫。然后在點(diǎn)自己的的數(shù)據(jù)庫名,就在左邊。
在輸入命令那兒輸入以下命令。
CREATE TABLE jpg (
id int(8) NOT NULL auto_increment,
url char(255) NOT NULL,
mess char(100) NOT NULL,
fromx char(50) NOT NULL,
url1 char(255) NOT NULL,
mess1 char(100) NOT NULL,
fromx1 char(50) NOT NULL,
url2 char(255) NOT NULL,
mess2 char(100) NOT NULL,
fromx2 char(50) NOT NULL,
url3 char(255) NOT NULL,
mess3 char(100) NOT NULL,
fromx3 char(50) NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE jpg1 (
id int(8) NOT NULL auto_increment,
url char(255) NOT NULL,
mess char(100) NOT NULL,
fromx char(50) NOT NULL,
url1 char(255) NOT NULL,
mess1 char(100) NOT NULL,
fromx1 char(50) NOT NULL,
url2 char(255) NOT NULL,
mess2 char(100) NOT NULL,
fromx2 char(50) NOT NULL,
url3 char(255) NOT NULL,
mess3 char(100) NOT NULL,
fromx3 char(50) NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE jpg2 (
id int(8) NOT NULL auto_increment,
url char(255) NOT NULL,
mess char(100) NOT NULL,
fromx char(50) NOT NULL,
url1 char(255) NOT NULL,
mess1 char(100) NOT NULL,
fromx1 char(50) NOT NULL,
url2 char(255) NOT NULL,
mess2 char(100) NOT NULL,
fromx2 char(50) NOT NULL,
url3 char(255) NOT NULL,
mess3 char(100) NOT NULL,
fromx3 char(50) NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE jpg3 (
id int(8) NOT NULL auto_increment,
url char(255) NOT NULL,
mess char(100) NOT NULL,
fromx char(50) NOT NULL,
url1 char(255) NOT NULL,
mess1 char(100) NOT NULL,
fromx1 char(50) NOT NULL,
url2 char(255) NOT NULL,
mess2 char(100) NOT NULL,
fromx2 char(50) NOT NULL,
url3 char(255) NOT NULL,
mess3 char(100) NOT NULL,
fromx3 char(50) NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE jpg4 (
id int(8) NOT NULL auto_increment,
url char(255) NOT NULL,
mess char(100) NOT NULL,
fromx char(50) NOT NULL,
url1 char(255) NOT NULL,
mess1 char(100) NOT NULL,
fromx1 char(50) NOT NULL,
url2 char(255) NOT NULL,
mess2 char(100) NOT NULL,
fromx2 char(50) NOT NULL,
url3 char(255) NOT NULL,
mess3 char(100) NOT NULL,
fromx3 char(50) NOT NULL,
PRIMARY KEY (id)
);
這些命令的意思是創(chuàng)建四個(gè)表來存放數(shù)據(jù)。這就代表圖片的四個(gè)類。如果你要加類就可以多加表和改一下源程序。
請(qǐng)別忘了和我說一聲呀。 :P
源程序的演示頁面在elong.oso.com.cn/desk/
第一步創(chuàng)建數(shù)據(jù)庫:
我們就以OSO的數(shù)據(jù)庫為列說明一下。
先登入數(shù)據(jù)庫。然后在點(diǎn)自己的的數(shù)據(jù)庫名,就在左邊。
在輸入命令那兒輸入以下命令。
CREATE TABLE jpg (
id int(8) NOT NULL auto_increment,
url char(255) NOT NULL,
mess char(100) NOT NULL,
fromx char(50) NOT NULL,
url1 char(255) NOT NULL,
mess1 char(100) NOT NULL,
fromx1 char(50) NOT NULL,
url2 char(255) NOT NULL,
mess2 char(100) NOT NULL,
fromx2 char(50) NOT NULL,
url3 char(255) NOT NULL,
mess3 char(100) NOT NULL,
fromx3 char(50) NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE jpg1 (
id int(8) NOT NULL auto_increment,
url char(255) NOT NULL,
mess char(100) NOT NULL,
fromx char(50) NOT NULL,
url1 char(255) NOT NULL,
mess1 char(100) NOT NULL,
fromx1 char(50) NOT NULL,
url2 char(255) NOT NULL,
mess2 char(100) NOT NULL,
fromx2 char(50) NOT NULL,
url3 char(255) NOT NULL,
mess3 char(100) NOT NULL,
fromx3 char(50) NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE jpg2 (
id int(8) NOT NULL auto_increment,
url char(255) NOT NULL,
mess char(100) NOT NULL,
fromx char(50) NOT NULL,
url1 char(255) NOT NULL,
mess1 char(100) NOT NULL,
fromx1 char(50) NOT NULL,
url2 char(255) NOT NULL,
mess2 char(100) NOT NULL,
fromx2 char(50) NOT NULL,
url3 char(255) NOT NULL,
mess3 char(100) NOT NULL,
fromx3 char(50) NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE jpg3 (
id int(8) NOT NULL auto_increment,
url char(255) NOT NULL,
mess char(100) NOT NULL,
fromx char(50) NOT NULL,
url1 char(255) NOT NULL,
mess1 char(100) NOT NULL,
fromx1 char(50) NOT NULL,
url2 char(255) NOT NULL,
mess2 char(100) NOT NULL,
fromx2 char(50) NOT NULL,
url3 char(255) NOT NULL,
mess3 char(100) NOT NULL,
fromx3 char(50) NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE jpg4 (
id int(8) NOT NULL auto_increment,
url char(255) NOT NULL,
mess char(100) NOT NULL,
fromx char(50) NOT NULL,
url1 char(255) NOT NULL,
mess1 char(100) NOT NULL,
fromx1 char(50) NOT NULL,
url2 char(255) NOT NULL,
mess2 char(100) NOT NULL,
fromx2 char(50) NOT NULL,
url3 char(255) NOT NULL,
mess3 char(100) NOT NULL,
fromx3 char(50) NOT NULL,
PRIMARY KEY (id)
);
這些命令的意思是創(chuàng)建四個(gè)表來存放數(shù)據(jù)。這就代表圖片的四個(gè)類。如果你要加類就可以多加表和改一下源程序。
您可能感興趣的文章:
- MySQL創(chuàng)建數(shù)據(jù)庫并支持中文字符的操作方法
- Mysql匿名登錄無法創(chuàng)建數(shù)據(jù)庫問題解決方案
- MySql添加新用戶及為用戶創(chuàng)建數(shù)據(jù)庫和給用戶分配權(quán)限方法介紹
- mysql創(chuàng)建數(shù)據(jù)庫,添加用戶,用戶授權(quán)實(shí)操方法
- MySQL創(chuàng)建數(shù)據(jù)庫的兩種方法
- 用MySQL創(chuàng)建數(shù)據(jù)庫和數(shù)據(jù)庫表代碼
- 實(shí)例講解通過PHP創(chuàng)建數(shù)據(jù)庫
- 創(chuàng)建數(shù)據(jù)庫php代碼 用PHP寫出自己的BLOG系統(tǒng)
- MySQL與PHP的基礎(chǔ)與應(yīng)用專題之創(chuàng)建數(shù)據(jù)庫表
相關(guān)文章
WordPress中獲取所使用的模板的頁面ID的簡(jiǎn)單方法
這篇文章主要介紹了WordPress中獲取所使用的模板的頁面ID的簡(jiǎn)單方法,通過這個(gè)方法來獲取頁面的鏈接是比較方便的,需要的朋友可以參考下2015-12-12PHP is_array() 檢測(cè)變量是否是數(shù)組的實(shí)現(xiàn)方法
下面小編就為大家?guī)硪黄狿HP is_array() 檢測(cè)變量是否是數(shù)組的實(shí)現(xiàn)方法。小編覺得挺不錯(cuò)的,現(xiàn)在就分享給大家,也給大家做個(gè)參考,一起跟隨小編過來看看吧2016-06-06php二維數(shù)組排序與默認(rèn)自然排序的方法介紹
本篇文章介紹了,在php中二維數(shù)組排序與默認(rèn)自然排序的方法。需要的朋友參考下2013-04-04Laravel實(shí)現(xiàn)用戶多字段認(rèn)證的解決方法
最近在工作中遇到一個(gè)問題,需要多字段的驗(yàn)證,通過查找相關(guān)資料終于解決了,下面這篇文章主要給大家介紹了關(guān)于Laravel如何實(shí)現(xiàn)用戶多字段認(rèn)證的解決方法,文中通過示例代碼介紹的非常詳細(xì),需要的朋友們可以參考借鑒,下面來一起看看吧。2017-09-09