當前位置:首頁 » 服務存儲 » 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