drop table treenode;
//NODEID 为id
//NODEPARENT 为父节点id,如没有则为null
//NODECELL 为节点所在层,根节点为1层
//NODETITLE 为节点显示标题
//NODETEXT 为节点链接
create table treenode(NODEID int(4) auto_increment,
NODEPARENT int(4) default 0,
NODECELL int(2),
NODETITLE varchar(50) not null,
NODETEXT varchar(50),
primary key (NODEID));
insert into treenode(NODECELL,NODETITLE)
values(1,"tool");
insert into treenode(NODEPARENT,NODECELL,NODETITLE,NODETEXT)
values(1,2,"knife","test1.jsp");
insert into treenode(NODEPARENT,NODECELL,NODETITLE,NODETEXT)
values(1,2,"snip","test2.jsp");
insert into treenode(NODEPARENT,NODECELL,NODETITLE,NODETEXT)
values(1,2,"cup","test2.jsp");
insert into treenode(NODEPARENT,NODECELL,NODETITLE,NODETEXT)
values(4,3,"watercup","test2.jsp");
insert into treenode(NODEPARENT,NODECELL,NODETITLE,NODETEXT)
values(4,3,"teacup","test1.jsp");
insert into treenode(NODECELL,NODETITLE)
values(1,"drink");
insert into treenode(NODEPARENT,NODECELL,NODETITLE,NODETEXT)
values(7,2,"tea","test1.jsp");
insert into treenode(NODEPARENT,NODECELL,NODETITLE,NODETEXT)
values(7,2,"coffee","test1.jsp");
INSERT INTO treenode(
NODECELL,NODETITLE,NODETEXT) values (
1,'文章类别1','pub.do?dispatch=addContentType0');
insert into treenode(NODEPARENT,NODECELL,NODETITLE,NODETEXT)
values(7,2,"文","test1.jsp");
create trigger treenode_bef_insupdate
before update on treenode
for each row
begin
set @old = OLD.nodeenabled;
set @new = NEW.nodeenabled;
set old = '2';
end; //
CREATE TRIGGER t21_au
BEFORE UPDATE ON treenode
FOR EACH ROW
BEGIN
SET @old = OLD.nodeenabled;
SET @new = NEW.nodeenabled;
END;//
CREATE TRIGGER t1 AFTER INSERT ON
data FOR EACH ROW UPDATE chars SET count = count + CHAR_LENGTH(NEW.name);
create trigger delforums after delete on treenode
for each row begin
delete from treenode
end
CREATE TRIGGER t1 AFTER INSERT ON
treenode FOR EACH ROW insert into userlog(name) values('ff')
delimiter |
create trigger tff after insrt on treenode
for each row
begin
insert into userlog(name) values('ff');
end;
|
drop trigger treenode_bef_ins;
delimiter |
create trigger treenode_bef_ins before update on treenode
for each row
begin
set NEW.nodeenabled = '2' ;
end;
|
delimiter ;
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
项目名称:BBS电子论坛Java版 项目简介:一个Java项目工程源码,主要实现BBS论坛功能,十分强大,功能丰富。 资源内容:数据库脚本,工程源码 使用方法: 1,将建库脚本db.txt和treenodeDB.txt导入mysql执行。 2,导入yourforum到Idea,编辑修改数据库连接。 3,编译并运行,打包到tomcat的webapps目录下,启动运行即可。 4,浏览器访问。 项目技术架构:Struts2+Hibernate
资源推荐
资源详情
资源评论
收起资源包目录
BBS电子论坛Java版项目工程源码 (365个子文件)
ContentType1Action.class 16KB
ContentAction.class 16KB
ContentType0Action.class 12KB
UserAction.class 11KB
AdminAction.class 11KB
ContentService.class 10KB
UploadFile.class 10KB
PubAction.class 6KB
UserService.class 6KB
Nav2Tag.class 6KB
FriendLinkAction.class 6KB
Pub.class 5KB
ForumMasterService.class 5KB
ReviewContentService.class 5KB
DBAccessService.class 5KB
TreeMenuTag.class 4KB
PageTag2.class 4KB
PageTag.class 4KB
ContentType0Service.class 4KB
ContentType1Service.class 4KB
ContentType1VO.class 4KB
ForumLogService.class 4KB
ReviewContentAction.class 3KB
FriendLinkService.class 3KB
ContentVO.class 3KB
Nav1.class 3KB
User.class 3KB
UserActionForm.class 3KB
ContentType1.class 3KB
PaginationTag.class 3KB
Content.class 3KB
PageTag1.class 3KB
LogTag.class 3KB
InitActionServlet.class 3KB
Node.class 2KB
ContentType1ActionForm.class 2KB
UserVO.class 2KB
ForumAdminService.class 2KB
FriendLinkTag.class 2KB
ReviewContent.class 2KB
ContentType0.class 2KB
ContentType0ActionForm.class 2KB
Tree.class 2KB
ContentType0VO.class 2KB
HibernateUtil.class 2KB
EncodingFilter.class 2KB
TreeNode.class 2KB
ForumMaster.class 1KB
Face.class 1KB
PageActionForm.class 1KB
PageForm.class 1KB
FriendLink.class 1KB
ForumAdmin.class 1KB
FriendLinkActionForm.class 1KB
ContentActionForm.class 1KB
ReviewContentVO.class 1KB
ReviewContentActionForm.class 1KB
ForumAdminActionForm.class 1KB
Pagination.class 1003B
PageInfo.class 997B
Page.class 985B
ForumLog.class 930B
Log.class 904B
BasicVO.class 897B
IndexVO.class 557B
ForumException.class 370B
ForumAdminAction.class 339B
ForumLogVO.class 289B
.classpath 3KB
styles.css 5KB
Thumbs.db 61KB
Thumbs.db 55KB
Thumbs.db 40KB
footlogo.gif 7KB
discuz_icon.gif 1KB
1.gif 1KB
folder_hot.gif 1KB
top.gif 998B
newtopic.gif 981B
reply.gif 904B
corner-outside-bottom-left.gif 832B
corner-outside-bottom-right.gif 832B
corner-outside-top-right.gif 831B
corner-outside-top-left.gif 829B
preview.gif 732B
acode.gif 718B
bcode.gif 718B
adesign.gif 712B
bdesign.gif 709B
folder_new.gif 700B
printpreview.gif 586B
folder_common.gif 487B
forecolor.gif 322B
link.gif 313B
corner-inside-bottom-left.gif 310B
5.gif 303B
4.gif 303B
3.gif 298B
help.gif 297B
img.gif 297B
共 365 条
- 1
- 2
- 3
- 4
资源评论
小小哭包
- 粉丝: 1904
- 资源: 3909
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功