Cs_applicationconfigurationsettings_createupdate // cs_applicationconfigurationsettings_get // cs_audit

Source: Internet
Author: User

Alter procedure [DBO]. cs_applicationconfigurationsettings_createupdate -- 11, 36, 0, 1, 0
(---------- Application configuration settings
@ Settingsid int,
@ Applicationtype smallint,
@ Settings ntext = NULL
)

As

If exists (select settingsid from cs_applicationconfigurationsettings where settingsid = @ settingsid and applicationtype = @ applicationtype)
Begin --- if this configuration exists, update the data
Update cs_applicationconfigurationsettings
Set settings = @ settings
Where settingsid = @ settingsid and applicationtype = @ applicationtype
End
Else
Begin ----- if it does not exist, insert data
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
---- Query the detailed configuration information of this configuration.
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
/** // * Sets the transaction isolation level. Read uncommitted performs dirty read or 0 isolation locks, which means no shared lock is issued,
The exclusive lock is also not accepted. When this option is set, uncommitted read or dirty read can be performed on the data.
Change the value in the data, and the row can also appear in the dataset or disappear from the dataset. The role of this option and all
Set nolock to the same for all tables in the statement. This is the minimum limit among the four isolation levels. */

-- Get the post
-- Get the basic information of the post. This stored procedure has a useful view. Check the view before reading it.
Exec cs_forums_post @ postid, null, 0, @ settingsid

Select
B. description,
U. username,
A .*
From
Cs_moderationaudit,
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
/** // * Indicates the operation record. The more data fields that follow them, the less understandable they are -_-!!! */
Moderatedon



Go

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.