This 存储过程 is used by the HtmlModule edit page to apply changes to an existing HtmlText item. The input parameters include the item's primary key (ModuleID), plus Desktop HTML, Mobile Summary text and 移动详细资料 text.
定义:
CREATE PROCEDURE UpdateHtmlText
(
@ModuleID int,
@DesktopHtml ntext,
@MobileSummary ntext,
@MobileDetails ntext
)
AS
IF NOT EXISTS (
SELECT
*
FROM
HtmlText
WHERE
ModuleID = @ModuleID
)
INSERT INTO HtmlText (
ModuleID,
DesktopHtml,
MobileSummary,
MobileDetails
)
VALUES (
@ModuleID,
@DesktopHtml,
@MobileSummary,
@MobileDetails
)
ELSE
UPDATE
HtmlText
SET
DesktopHtml = @DesktopHtml,
MobileSummary = @MobileSummary,
MobileDetails = @MobileDetails
WHERE
ModuleID = @ModuleID
使用的数据库中的表:
HtmlText: Each record in the HtmlText holds the HTML and text associated with a specific Html module. Each of the text field - DesktopHtml, MobileSummary, and MobileDetails - is stored in a SQL Unicode text field, and can hold up to 1,073,741,823 characters.
The primary key in this table is the ModuleID field.