php的yii框架开发总结2
生活随笔
收集整理的這篇文章主要介紹了
php的yii框架开发总结2
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
開發流程:
1、用yii創建網站目錄,當時用命令行創建時遇到了問題,試了很久才找到原因:
我的原因是在yii/framework/yiic.bat這個文件中的一條語句:
) 最重要的應該就是外鍵關系了,比如roomid是外鍵,會對應tbl_room數據表的id主鍵。 foreign key(roomid) references tbl_room(id),//直接指明外間關系
constraint fk_a foreign key(author_id) references tbl_user(id),//如果要命名的話用這條語句 alter table tbl_user add foreign key(roomid) references tbl_room(id),//添加外鍵
create table tbl_user(
id int auto_increment primary key,
name varchar(20) not null,
password varchar(20) not null,
score int default 0,
view_psw varchar(20),
member_id int default 1,
foreign key(member_id) references tbl_member(id)
)
create table tbl_location(
id int auto_increment primary key,
lat float not null,
lng float not null,
local_time int,
user_id int not null,
foreign key(user_id) references tbl_user(id)
) 隨時補充數據庫知識。
轉載于:https://www.cnblogs.com/nannanITeye/p/3244683.html
總結
以上是生活随笔為你收集整理的php的yii框架开发总结2的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 8月6日小练
- 下一篇: hiberante 二级缓存设置