网站地图    收藏   

主页 > php专栏 > php综合实列 >

社区(php&&mysql)六-PHP实例

来源:自学PHP网    时间:2014-12-25 09:57 作者: 阅读:

[导读] 社区phpamp;amp;mysql六,//此为bbs.sqlCREATETABLEbbs_areanbsp;nbsp;nbsp;idint10unsignedDEFAULT'0'NOTNULLauto_increment,nbsp;nbsp;nbsp;mastervarchar150NOTNULL,nbsp;nbsp;nbsp;bannervarchar150NOTNULL,nbsp;nbsp;nbsp;bodytextNOTNULL,nbsp;nbsp;...

//此为bbs.sql

CREATE TABLE bbs_area (
   id int(10) unsigned DEFAULT '0' NOT NULL auto_increment,
   master varchar(150) NOT NULL,
   banner varchar(150) NOT NULL,
   body text NOT NULL,
   email varchar(50),
   login varchar(20),
   passwd varchar(20),
   PRIMARY KEY (id)
);

INSERT INTO bbs_area VALUES ( '1', 'master', '癚阶跋@', '', 'jerry@mail.jerry.com.tw', 'master', '111111');


CREATE TABLE bbs_sml (
   id int(8) unsigned DEFAULT '0' NOT NULL auto_increment,
   sid int(8) unsigned DEFAULT '0' NOT NULL,
   email char(60) NOT NULL,
   PRIMARY KEY (id),
   KEY sid (sid),
   KEY email (email)
);

CREATE TABLE bbs_subj (
   id int(10) unsigned DEFAULT '0' NOT NULL auto_increment,
   aid int(10) unsigned DEFAULT '0' NOT NULL,
   banner varchar(150) NOT NULL,
   body text NOT NULL,
   poster varchar(20) NOT NULL,
   email varchar(50),
   pip varchar(20) NOT NULL,
   wdate datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
   views int(8) unsigned DEFAULT '1' NOT NULL,
   good int(2) unsigned DEFAULT '0' NOT NULL,
   PRIMARY KEY (id),
   KEY aid (aid),
   KEY good (good),
   KEY wdate (wdate)
);

CREATE TABLE bbs_docs (
   id int(10) unsigned DEFAULT '0' NOT NULL auto_increment,
   aid int(10) unsigned DEFAULT '0' NOT NULL,
   sid int(10) unsigned DEFAULT '0' NOT NULL,
   banner varchar(150) NOT NULL,
   body text NOT NULL,
   poster varchar(20) NOT NULL,
   email varchar(50),
   pip varchar(20) NOT NULL,
   wdate datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
   views int(8) unsigned DEFAULT '1' NOT NULL,
   good int(2) unsigned DEFAULT '0' NOT NULL,
   PRIMARY KEY (id),
   KEY aid (aid),
   KEY good (good),
   KEY wdate (wdate)
);

CREATE TABLE bbs_sel (
   id int(8) unsigned DEFAULT '0' NOT NULL auto_increment,
   sid int(8) unsigned DEFAULT '0' NOT NULL,
   banner char(80) NOT NULL,
   sel_0 char(80) NOT NULL,
   sel_1 char(80) NOT NULL,
   sel_2 char(80) NOT NULL,
   sel_3 char(80) NOT NULL,
   sel_4 char(80) NOT NULL,
   sel_5 char(80) NOT NULL,
   sel_6 char(80) NOT NULL,
   sel_7 char(80) NOT NULL,
   sn_0 int(8) DEFAULT '0' NOT NULL,
   sn_1 int(8) DEFAULT '0' NOT NULL,
   sn_2 int(8) DEFAULT '0' NOT NULL,
   sn_3 int(8) DEFAULT '0' NOT NULL,
   sn_4 int(8) DEFAULT '0' NOT NULL,
   sn_5 int(8) DEFAULT '0' NOT NULL,
   sn_6 int(8) DEFAULT '0' NOT NULL,
   sn_7 int(8) DEFAULT '0' NOT NULL,
   PRIMARY KEY (id)
);




//此为sql.php3


<?
$sql['user']="root";
$sql['passwd']="戈飘w盞絏";
$sql['db']="恶JA焊戤飘wW嘿";
$sql['host']="localhost";

?> 

自学PHP网专注网站建设学习,PHP程序学习,平面设计学习,以及操作系统学习

京ICP备14009008号-1@版权所有www.zixuephp.com

网站声明:本站所有视频,教程都由网友上传,站长收集和分享给大家学习使用,如由牵扯版权问题请联系站长邮箱904561283@qq.com

添加评论