当前位置:首页 » 服务存储 » livego存储视频
扩展阅读
webinf下怎么引入js 2023-08-31 21:54:13
堡垒机怎么打开web 2023-08-31 21:54:11

livego存储视频

发布时间: 2022-07-16 20:23:22

㈠ 怎么创建存储过程在哪里创建

是什么数据库啊,我给你个SQL SERVER的吧

/*---------------------- 练习二 -------------------------*/

use bbsDB
go
if exists(select * from sysobjects where name='proc_find1')
drop procere proc_find1
go
create procere proc_find1
@userName varchar(10)
as
set nocount on
declare @userID varchar(10)
select @userID=UID from bbsUsers where Uname=@userName
if exists(select * from bbsTopic where TuID=@userID)
begin
print @userName+'发表的主帖如下:'
select 发帖时间=convert(varchar(10),Ttime,111),点击率=TclickCount,
主题=Ttopic,内容=Tcontents from bbsTopic where TuID=@userID
end
else
print @userName+'没有发表过主帖。'
if exists(select * from bbsReply where RuID=@userID)
begin
print @userName+'发表的回帖如下:'
select 回帖时间=convert(varchar(10),Rtime,111),点击率=RclickCount,
回帖内容=Rcontents from bbsReply where RuID=@userID
end
else
print @userName+'没有发表过回帖。'
go

exec proc_find1 '可卡因'

/*---------------------- 练习三 -------------------------*/

if exists(select * from sysobjects where name='proc_find2')
drop procere proc_find2
go
create procere proc_find2
@userName varchar(10),
@sumTopic int output,
@sumReply int output
as
set nocount on
declare @userID varchar(10)
select @userID=UID from bbsUsers where Uname=@userName
if exists(select * from bbsTopic where TuID=@userID)
begin
select @sumTopic=count(*) from bbsTopic where TuID=@userID
print @userName+'发表的主帖如下:'
select 发帖时间=convert(varchar(10),Ttime,111),点击率=TclickCount,
主题=Ttopic,内容=Tcontents from bbsTopic where TuID=@userID
end
else
begin
set @sumTopic=0
print @userName+'没有发表过主帖。'
end
if exists(select * from bbsReply where RuID=@userID)
begin
select @sumReply=count(*) from bbsReply where RuID=@userID
print @userName+'发表的回帖如下:'
select 回帖时间=convert(varchar(10),Rtime,111),点击率=RclickCount,
回帖内容=Rcontents from bbsReply where RuID=@userID
end
else
begin
set @sumReply=0
print @userName+'没有发表过回帖。'
end
go

declare @sum1 int, @sum2 int
exec proc_find2 '可卡因',@sum1 output,@sum2 output
if @sum1>@sum2
print '小弟发帖比回帖多,看来比较喜欢标新立异!'
else
print '小弟回帖比发帖多,看来比较关心民众疾苦!'
print '总帖数:'+convert(varchar(5), @sum1+@sum2)
go

/*---------------------- 练习题一 -------------------------*/

if exists(select * from sysobjects where name='proc_find3')
drop procere proc_find3
go
create procere proc_find3
@userName varchar(10),
@sumTopic int output,
@sumReply int output,
@secName varchar(15)=''
as
set nocount on
declare @userID varchar(10)
select @userID=UID from bbsUsers where Uname=@userName
--版块名称为空
if (@secName='')
begin
if exists(select * from bbsTopic where TuID=@userID)
begin
select @sumTopic=count(*) from bbsTopic where TuID=@userID
print @userName+'发表的主帖数为:'+convert(varchar(5),@sumTopic)+' , 内容如下:'
select 发帖时间=convert(varchar(10),Ttime,111),点击率=TclickCount,
主题=Ttopic,内容=Tcontents from bbsTopic where TuID=@userID
end
else
begin
set @sumTopic=0
print @userName+'没有发表过主帖。'
end
if exists(select * from bbsReply where RuID=@userID)
begin
select @sumReply=count(*) from bbsReply where RuID=@userID
print @userName+'发表的回帖数量为:'+convert(varchar(5),@sumReply)+' , 内容如下:'
select 回帖时间=convert(varchar(10),Rtime,111),点击率=RclickCount,
回帖内容=Rcontents from bbsReply where RuID=@userID
end
else
begin
set @sumReply=0
print @userName+'没有发表过回帖。'
end
end
--版块名称不为空
else
begin
if exists(select * from bbsTopic where TuID=@userID)
begin
select @sumTopic=count(*) from bbsTopic where TuID=@userID
and TsID=(select SID from bbsSection where Sname like @secName)
print @userName+'曾在 '+@secName+' 版块发表的主帖数量为:'+convert(varchar(5),@sumTopic)+' , 内容如下:'
select 发帖时间=convert(varchar(10),Ttime,111),点击率=TclickCount,
版块名称=@secName,主题=Ttopic,内容=Tcontents from bbsTopic where TuID=@userID
end
else
begin
set @sumTopic=0
print @userName+'没有发表过主帖。'
end
if exists(select * from bbsReply where RuID=@userID)
begin
select @sumReply=count(*) from bbsReply where RuID=@userID
and RsID=(select SID from bbsSection where Sname like @secName)
print @userName+'曾在 '+@secName+' 版块发表的回帖数量为:'+convert(varchar(5),@sumReply)+' , 内容如下:'
select 回帖时间=convert(varchar(10),Rtime,111),点击率=RclickCount,
版块名称=@secName,回帖内容=Rcontents from bbsReply where RuID=@userID
end
else
begin
set @sumReply=0
print @userName+'没有发表过回帖。'
end
end
go

declare @sum1 int, @sum2 int
exec proc_find3 '可卡因',@sum1 output,@sum2 output,'.NET技术'
if @sum1>@sum2
print '小弟发帖比回帖多,看来比较喜欢标新立异!'
else
print '小弟回帖比发帖多,看来比较关心民众疾苦!'
print '总帖数:'+convert(varchar(5), @sum1+@sum2)
go

/*---------------------- 练习题二 -------------------------*/

/*---------------------- 作业题 -------------------------*/

use bbsDB
go
if exists(select * from sysobjects where name='proc_delive')
drop procere proc_delive
go
create procere proc_delive
@userName varchar(10),
@sectionName varchar(20),
@topic varchar(20),
@contents varchar(20),
@face int
as
set nocount on
declare @userID varchar(10),@sectionID varchar(10)
select @userID=UID from bbsUsers where Uname=@userName
select @sectionID=SID from bbsSection where Sname like @sectionName

print @userName+'发帖前的状态如下:'
select * from bbsUsers where UID=@userID

insert into bbsTopic(TsID,TuID,Ttopic,Tcontents,Tface)
values(@sectionID,@userID,@topic,@contents,@face)

print @userName+'发帖如下:'
select * from bbsTopic where TID=@@identity

update bbsSection set StopicCount=StopicCount+1 where SID=@sectionID
if not exists(select * from bbsTopic where Ttopic like @topic and TuID=@userID)
update bbsUsers set Upoint=Upoint+100 where UID=@userID
else
update bbsUsers set Upoint=Upoint+50 where UID=@userID

update bbsUsers set Uclass=case
when Upoint <500 then 1
when Upoint between 500 and 1000 then 2
when Upoint between 1001 and 2000 then 3
when Upoint between 2001 and 4000 then 4
when Upoint between 4001 and 5000 then 5
else 6
end
where UID=@userID

print @userName+'发帖后的状态如下:'
select * from bbsUsers where UID=@userID
go

exec proc_delive '心酸果冻','.NET技术','.NET问题','请问如何使用……',3
go

㈡ 网络摄像头如何按需推流

首先你摄像机的接口与4G编码器进行连接,另外编码器冷靴安装架设在摄像机上。

千视4G编码器特点:

●采用H.265编码,1080p高清直播,4路4G聚合,支持SRT协议,内置电池,提供冷靴安装;

●支持图文叠加,录像存储,还可提供SDK;

●低带宽(只需2-3兆即可),户外移动专业直播设备;

㈢ 如何创建存储过程

是什么数据库啊,我给你个SQL SERVER的吧

/*---------------------- 练习二 -------------------------*/

use bbsDB
go
if exists(select * from sysobjects where name='proc_find1')
drop procere proc_find1
go
create procere proc_find1
@userName varchar(10)
as
set nocount on
declare @userID varchar(10)
select @userID=UID from bbsUsers where Uname=@userName
if exists(select * from bbsTopic where TuID=@userID)
begin
print @userName+'发表的主帖如下:'
select 发帖时间=convert(varchar(10),Ttime,111),点击率=TclickCount,
主题=Ttopic,内容=Tcontents from bbsTopic where TuID=@userID
end
else
print @userName+'没有发表过主帖。'
if exists(select * from bbsReply where RuID=@userID)
begin
print @userName+'发表的回帖如下:'
select 回帖时间=convert(varchar(10),Rtime,111),点击率=RclickCount,
回帖内容=Rcontents from bbsReply where RuID=@userID
end
else
print @userName+'没有发表过回帖。'
go

exec proc_find1 '可卡因'

/*---------------------- 练习三 -------------------------*/

if exists(select * from sysobjects where name='proc_find2')
drop procere proc_find2
go
create procere proc_find2
@userName varchar(10),
@sumTopic int output,
@sumReply int output
as
set nocount on
declare @userID varchar(10)
select @userID=UID from bbsUsers where Uname=@userName
if exists(select * from bbsTopic where TuID=@userID)
begin
select @sumTopic=count(*) from bbsTopic where TuID=@userID
print @userName+'发表的主帖如下:'
select 发帖时间=convert(varchar(10),Ttime,111),点击率=TclickCount,
主题=Ttopic,内容=Tcontents from bbsTopic where TuID=@userID
end
else
begin
set @sumTopic=0
print @userName+'没有发表过主帖。'
end
if exists(select * from bbsReply where RuID=@userID)
begin
select @sumReply=count(*) from bbsReply where RuID=@userID
print @userName+'发表的回帖如下:'
select 回帖时间=convert(varchar(10),Rtime,111),点击率=RclickCount,
回帖内容=Rcontents from bbsReply where RuID=@userID
end
else
begin
set @sumReply=0
print @userName+'没有发表过回帖。'
end
go

declare @sum1 int, @sum2 int
exec proc_find2 '可卡因',@sum1 output,@sum2 output
if @sum1>@sum2
print '小弟发帖比回帖多,看来比较喜欢标新立异!'
else
print '小弟回帖比发帖多,看来比较关心民众疾苦!'
print '总帖数:'+convert(varchar(5), @sum1+@sum2)
go

/*---------------------- 练习题一 -------------------------*/

if exists(select * from sysobjects where name='proc_find3')
drop procere proc_find3
go
create procere proc_find3
@userName varchar(10),
@sumTopic int output,
@sumReply int output,
@secName varchar(15)=''
as
set nocount on
declare @userID varchar(10)
select @userID=UID from bbsUsers where Uname=@userName
--版块名称为空
if (@secName='')
begin
if exists(select * from bbsTopic where TuID=@userID)
begin
select @sumTopic=count(*) from bbsTopic where TuID=@userID
print @userName+'发表的主帖数为:'+convert(varchar(5),@sumTopic)+' , 内容如下:'
select 发帖时间=convert(varchar(10),Ttime,111),点击率=TclickCount,
主题=Ttopic,内容=Tcontents from bbsTopic where TuID=@userID
end
else
begin
set @sumTopic=0
print @userName+'没有发表过主帖。'
end
if exists(select * from bbsReply where RuID=@userID)
begin
select @sumReply=count(*) from bbsReply where RuID=@userID
print @userName+'发表的回帖数量为:'+convert(varchar(5),@sumReply)+' , 内容如下:'
select 回帖时间=convert(varchar(10),Rtime,111),点击率=RclickCount,
回帖内容=Rcontents from bbsReply where RuID=@userID
end
else
begin
set @sumReply=0
print @userName+'没有发表过回帖。'
end
end
--版块名称不为空
else
begin
if exists(select * from bbsTopic where TuID=@userID)
begin
select @sumTopic=count(*) from bbsTopic where TuID=@userID
and TsID=(select SID from bbsSection where Sname like @secName)
print @userName+'曾在 '+@secName+' 版块发表的主帖数量为:'+convert(varchar(5),@sumTopic)+' , 内容如下:'
select 发帖时间=convert(varchar(10),Ttime,111),点击率=TclickCount,
版块名称=@secName,主题=Ttopic,内容=Tcontents from bbsTopic where TuID=@userID
end
else
begin
set @sumTopic=0
print @userName+'没有发表过主帖。'
end
if exists(select * from bbsReply where RuID=@userID)
begin
select @sumReply=count(*) from bbsReply where RuID=@userID
and RsID=(select SID from bbsSection where Sname like @secName)
print @userName+'曾在 '+@secName+' 版块发表的回帖数量为:'+convert(varchar(5),@sumReply)+' , 内容如下:'
select 回帖时间=convert(varchar(10),Rtime,111),点击率=RclickCount,
版块名称=@secName,回帖内容=Rcontents from bbsReply where RuID=@userID
end
else
begin
set @sumReply=0
print @userName+'没有发表过回帖。'
end
end
go

declare @sum1 int, @sum2 int
exec proc_find3 '可卡因',@sum1 output,@sum2 output,'.NET技术'
if @sum1>@sum2
print '小弟发帖比回帖多,看来比较喜欢标新立异!'
else
print '小弟回帖比发帖多,看来比较关心民众疾苦!'
print '总帖数:'+convert(varchar(5), @sum1+@sum2)
go

/*---------------------- 练习题二 -------------------------*/

/*---------------------- 作业题 -------------------------*/

use bbsDB
go
if exists(select * from sysobjects where name='proc_delive')
drop procere proc_delive
go
create procere proc_delive
@userName varchar(10),
@sectionName varchar(20),
@topic varchar(20),
@contents varchar(20),
@face int
as
set nocount on
declare @userID varchar(10),@sectionID varchar(10)
select @userID=UID from bbsUsers where Uname=@userName
select @sectionID=SID from bbsSection where Sname like @sectionName

print @userName+'发帖前的状态如下:'
select * from bbsUsers where UID=@userID

insert into bbsTopic(TsID,TuID,Ttopic,Tcontents,Tface)
values(@sectionID,@userID,@topic,@contents,@face)

print @userName+'发帖如下:'
select * from bbsTopic where TID=@@identity

update bbsSection set StopicCount=StopicCount+1 where SID=@sectionID
if not exists(select * from bbsTopic where Ttopic like @topic and TuID=@userID)
update bbsUsers set Upoint=Upoint+100 where UID=@userID
else
update bbsUsers set Upoint=Upoint+50 where UID=@userID

update bbsUsers set Uclass=case
when Upoint <500 then 1
when Upoint between 500 and 1000 then 2
when Upoint between 1001 and 2000 then 3
when Upoint between 2001 and 4000 then 4
when Upoint between 4001 and 5000 then 5
else 6
end
where UID=@userID

print @userName+'发帖后的状态如下:'
select * from bbsUsers where UID=@userID
go

exec proc_delive '心酸果冻','.NET技术','.NET问题','请问如何使用……',3
go