又与大家见面了。继续《PHP和MySQL Web开发》的总结。
Chapter8.设计Web数据库
·回去看看数据卡那本书吧,这里就不累赘谈这个东西。
Chapter9.创建Web数据库
·推荐PHP开发者安装phpmyadmin,一个有图形化界面的mysql管理软件。总比在命令行上写报错了不知道什么问题好。
·推一下我写的快图上传网站的web数据库设计吧。
1 create database discussion; 2 use discussion; 3 create table header 4 ( 5 parent int not null, 6 poster char(20) not null, 7 title char(20) not null, 8 children int default 0 not null, 9 area int default 1 not null, 10 posted datetime not null, 11 postid int unsigned not null auto_increment primary key 12 ); 13 14 create table body 15 ( 16 postid int unsigned not null primary key, 17 message text 18 ); 19 20 21 grant select, insert, update, delete 22 on discussion.* 23 to discussion@localhost identified by 'password';