能具体的写下sql语句不,我是这样写的,可以么
Create table message
(
id int primary key identity(1,1), ----主键
userId varchar(10) not null, ----用户ID
userName varchar(10) not null, ---- 用户姓名
content text not null, ----留言内容
parentId int default 0 not null, ----父留言ID(无则为0)
createTime datetime default getdate() not null ----提交时间
)
Create table message
(
id int primary key identity(1,1), ----主键
userId varchar(10) not null, ----用户ID
userName varchar(10) not null, ---- 用户姓名
content text not null, ----留言内容
parentId int default 0 not null, ----父留言ID(无则为0)
createTime datetime default getdate() not null ----提交时间
)
回复表 id主键 回复人编号(用户表外键) 留言表id(外键)被@人编号(用户表外键) 回复时间 回复内容
显示时 按时间顺序排序显示:
留言信息
xxx1 留言内容 时间
xxx2 回复xxx1 回复内容 时间
xxx2 回复 xxx2 回复内容 时间
在一个手机的应用上面实现评论的功能,我需要有什么,是不是需要有个一服务器,然后在上面部署一个数据库,处理手机app的请求?如果是的话,可不可以用一个pc代替一下服务器?
在一个手机的应用上面实现评论的功能,我需要有什么,是不是需要有个一服务器,然后在上面部署一个数据库,处理手机app的请求?如果是的话,可不可以用一个pc代替一下服务器?
同求指导