Created
June 30, 2016 21:13
-
-
Save jpcaparas/8e1029e3cb99de2623d3865adb7d9b93 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Fetch a page based on its ID: | |
Fields required: | |
- Title | |
- Description | |
- Thumbnail | |
- Section/category | |
TODO: On the where clause, specify page ID | |
**/ | |
SELECT | |
[Page].[Title] | |
,[Page].[MetaDescription] as Description | |
,[Page].[Image1] | |
,[Page].[Image2] | |
,[Page].[Image3] | |
,[Page].[Image4] | |
FROM [CMS_SAL_DEV].[CMS].[Page] [Page] | |
LEFT JOIN [CMS_SAL_DEV].[CMS].[PageType] PageType | |
ON [Page].[PageTypeID] = [PageType].[PageTypeID] | |
WHERE [Page].[PageID] = 1 | |
ORDER BY [Page].[Created] DESC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment