📄 files_post_getsortorder.prc
字号:
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[files_Post_GetSortOrder]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[files_Post_GetSortOrder]
GO
CREATE PROCEDURE [dbo].files_Post_GetSortOrder
@PostID int,
@sqlPopulate nvarchar(4000),
@SettingsID int
AS
-- Create a temp table to store the select results
CREATE TABLE #PageIndex
(
IndexID int IDENTITY (1, 1) NOT NULL,
ThreadID int
)
CREATE INDEX page_index ON #PageIndex(IndexID)
INSERT INTO #PageIndex (ThreadID)
EXEC (@sqlPopulate)
SELECT IndexID
FROM #PageIndex I
LEFT JOIN cs_Posts P ON P.ThreadID = I.ThreadID
WHERE P.PostID = @PostID
AND P.SettingsID = @SettingsID
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
grant execute on [dbo].files_Post_GetSortOrder to public
go
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -