spGet_Comments
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ParentID | int | IN | |
@ParentType | int | IN | |
@UserPersonalPageID | int | IN |
Definition
Copy
CREATE PROCEDURE [dbo].[spGet_Comments]
(
@ParentID int,
@ParentType int,
@UserPersonalPageID int
)
AS
BEGIN
SELECT CommentID,
CommentDate,
CommentAuthor,
Private,
CommentText FROM [Comments]
WHERE (@ParentType=1 and [SolicitorID] = @ParentID and [UserPersonalPageID] = @UserPersonalPageID)
or (@ParentType=4 and [SolicitorID] = @ParentID and [UserPersonalPageID] = @UserPersonalPageID)
or (@ParentType=2 and [TeamID] = @ParentID)
ORDER BY CommentDate DESC
END