Cs_feed_getall
Alter proc [DBO]. cs_feed_getall
(
@ Settingsid int
)
As
/** // * Query all references. It is more and more like a reference .*/
Select feedid,
URL,
Title,
Link,
Language,
Generator,
Subscribedate,
Lastupdatedate,
Feedstateid,
Lastmodified,
Etag
From cs_feed
Where settingsid = @ settingsid
Gocs_feed_addfeed
Alter proc [DBO]. cs_feed_addfeed -- should be referenced
@ Folderid Int = NULL,
@ Userid int,
@ URL nvarchar (255 ),
@ Settingsid int,
@ Feedid int output
As
Declare @ newfeedid int
-----------------------------------------------------------------------------
/** // * Because it is not very sure what the feed actually means, it is temporarily replaced by RSS or references.
What does it mean? Don't worry too much. Wait until I understand what it means to change it, or someone else directs me */
-----------------------------------------------------------------------------
-- First, let's see if the feed is already registered.
-- First query whether the reference exists.
Select @ newfeedid = feedid
From cs_feed
Where url = @ URL and settingsid = @ settingsid
-- If it's not, let's insert it and grab the feedid.
-- If this parameter does not exist, insert the reference and obtain the ID.
If (@ newfeedid is null)
Begin
-- Insert it.
Insert into cs_feed
(
URL,
Settingsid
)
Values
(
@ URL,
@ Settingsid
)
-- Grab the identity generated.
-- Get ID
Select @ newfeedid = @ identity
/** // * @ Identity returns the last inserted id value. */
End
-- Add the feed to the user's folder.
-- Add the folder referenced to the user
Insert into cs_folderfeed
(
Userid,
Folderid,
Feedid,
Settingsid
)
Values
(
@ Userid,
@ Folderid,
@ Newfeedid,
@ Settingsid
)
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