ALTER PROCEDURE [dbo].cs_ApplicationConfigurationSettings_CreateUpdate --11, 36, 0, 1, 0
( ----------应用程序配置设置
@SettingsID int,
@ApplicationType smallint,
@Settings NText = null
)
as
if exists(Select SettingsID FROM cs_ApplicationConfigurationSettings where SettingsID = @SettingsID and ApplicationType = @ApplicationType)
Begin ---如果存在此条配置,则更新数据
Update cs_ApplicationConfigurationSettings
Set Settings = @Settings
where SettingsID = @SettingsID and ApplicationType = @ApplicationType
End
Else
Begin-----如果不存在,则插入数据
Insert cs_ApplicationConfigurationSettings (SettingsID, ApplicationType, Settings)
Values(@SettingsID, @ApplicationType, @Settings)
End
ALTER PROCEDURE [dbo].cs_ApplicationConfigurationSettings_Get --11, 36, 0, 1, 0
(
@SettingsID int,
@ApplicationType smallint
)
as
----查询此条配置的详细配置信息
Select Settings FROM cs_ApplicationConfigurationSettings where SettingsID = @SettingsID and ApplicationType = @ApplicationType
GO
ALTER proc [dbo].cs_Audit_Post
(
@PostID int,
@SettingsID int
)
AS
SET Transaction Isolation Level Read UNCOMMITTED
/**//*设置事务隔离级别,Read UNCOMMITTED 执行脏读或 0 级隔离锁定,这表示不发出共享锁,
也不接受排它锁。当设置该选项时,可以对数据执行未提交读或脏读;在事务结束前可以更
改数据内的数值,行也可以出现在数据集中或从数据集消失。该选项的作用与在事务内所有
语句中的所有表上设置 NOLOCK 相同。这是四个隔离级别中限制最小的级别。*/
-- Get the Post
--获取帖子基本信息,此存储过程有用视图,看前要先看下视图
exec cs_forums_Post @PostID, null, 0, @SettingsID
SELECT
B.Description,
U.UserName,
A.*
FROM
cs_ModerationAudit A,
cs_ModerationAction B,
cs_vw_Users_FullUser U
WHERE
A.ModerationAction = B.ModerationAction AND
A.SettingsID = B.SettingsID AND
U.cs_UserID = A.ModeratorID AND
A.PostID = @PostID AND
A.SettingsID = @SettingsID
ORDER BY
/**//*都是关于操作的记录,越往后面数据字段越不理解了 -_-!!!*/
ModeratedOn
GO