📄 cs_sections_get.prc
字号:
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[cs_Sections_Get]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [cs_Sections_Get]
GO
CREATE PROCEDURE [dbo].cs_Sections_Get
(
@SettingsID int,
@ApplicationType tinyint = 0,
@AllowInactive bit = 0
)
AS
SET Transaction Isolation Level Read UNCOMMITTED
-- Return all the forums
SELECT
F.SectionID, F.SettingsID, F.IsActive, F.ParentID, F.GroupID, F.Name, F.NewsgroupName, F.Description, F.DateCreated, F.Url, F.IsModerated,
F.DaysToView, F.SortOrder, F.TotalPosts, F.TotalThreads, F.DisplayMask, F.EnablePostStatistics, F.EnableAutoDelete, F.EnableAnonymousPosting,
F.AutoDeleteThreshold, F.MostRecentPostID, F.MostRecentThreadID, F.MostRecentThreadReplies, F.MostRecentPostSubject, F.MostRecentPostAuthor,
F.MostRecentPostAuthorID, F.MostRecentPostDate, F.PostsToModerate, F.ForumType, F.IsSearchable, F.ApplicationType, F.ApplicationKey, F.Path,
F.PropertyNames as SectionPropertyNames, F.PropertyValues as SectionPropertyValues
FROM
cs_Sections F
WHERE
SettingsID = @SettingsID AND
--(IsActive = 1 OR 1 = @AllowInactive) AND
ApplicationType = @ApplicationType
--Declare @AnonID int
--exec cs_GetAnonymousUserID @SettingsID, @AnonID output
exec cs_Section_Permissions_Get @SettingsID, 0, @ApplicationType
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
grant execute on [cs_Sections_Get] to public
go
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -