于在发言管理中]
childnum int(11) default null, 子节点数量
moditime datetime default null, 最后修改时间
unique key id (id) 分类号 唯一
) type=myisam;
发言表
create table msg (
bid int(11) not null default '0', 分类号
id int(11) not null default '0', 分类内序号
topic varchar(100) not null default '', 主题
context text, 内容
author varchar(20) not null default '', 作者
email varchar(40) default '', 邮箱
wdate datetime not null default '0000-00-00 00:00:00',
发言时间
levelnum tinyint(3) unsigned not null default '0',
回复层次
orderid float not null default '0' 排序号
) type=myisam;
分类管理(不完整设计-添加分类)(3)
功能:
添加分类(addclass)
0.功能简述:
1 接口参数
1.1 入口
[parentid] //父分类号
<name> //类名
[其他字段] //非必须字段
1.2 出口
[errno] //错误码用 include 发送给 错误 显示功能(区分语言)
2 变量声明
var parentid;
var classstr;
3 功能实现
if(empty($name)){
errno = n;
include_once(错误功能页面); //错误页面根据语言输出错误并返回(见 func.txt)
}
//if(empty($parentid)):
$parentid = 0;//默认就是 0 此句不用写
// id 设置为自动增长
insert into class(classstr,parentid,name,[其他字段]) values(0,0,$name,[其他字段]);
//if(!empty($parentid)):
select @classstr:=concat(classstr,',',id) from class where id=$parentid; //concat 连接字符串
insert into class(classstr,parentid,name,[其他字段]) value
childnum int(11) default null, 子节点数量
moditime datetime default null, 最后修改时间
unique key id (id) 分类号 唯一
) type=myisam;
发言表
create table msg (
bid int(11) not null default '0', 分类号
id int(11) not null default '0', 分类内序号
topic varchar(100) not null default '', 主题
context text, 内容
author varchar(20) not null default '', 作者
email varchar(40) default '', 邮箱
wdate datetime not null default '0000-00-00 00:00:00',
发言时间
levelnum tinyint(3) unsigned not null default '0',
回复层次
orderid float not null default '0' 排序号
) type=myisam;
分类管理(不完整设计-添加分类)(3)
功能:
添加分类(addclass)
0.功能简述:
1 接口参数
1.1 入口
[parentid] //父分类号
<name> //类名
[其他字段] //非必须字段
1.2 出口
[errno] //错误码用 include 发送给 错误 显示功能(区分语言)
2 变量声明
var parentid;
var classstr;
3 功能实现
if(empty($name)){
errno = n;
include_once(错误功能页面); //错误页面根据语言输出错误并返回(见 func.txt)
}
//if(empty($parentid)):
$parentid = 0;//默认就是 0 此句不用写
// id 设置为自动增长
insert into class(classstr,parentid,name,[其他字段]) values(0,0,$name,[其他字段]);
//if(!empty($parentid)):
select @classstr:=concat(classstr,',',id) from class where id=$parentid; //concat 连接字符串
insert into class(classstr,parentid,name,[其他字段]) value
| 对此文章发表了评论 |
