RESULTSET |
query |
|
METARANK |
TXTFILENAME |
TXTMETADESCRIPTION |
TXTMETAKEYWORDS |
TXTMETATITLE |
TXTPAGENAME |
YSNACTIVE |
YSNPRIMARY |
1 |
2
|
blog/
|
Stay updated with Major Sports Augusta's blog. Dive into expert insights, local sports highlights, and the latest news on Augusta’s biggest golf events.
|
Major Sports Augusta, Masters, Masters Tickets, Masters Hospitality, Masters Golf, The Masters, Corporate sports travel, Sporting events, Travel Packages,
|
Read Our Blog | Major Sports Augusta
|
BLOG
|
1
|
1
|
|
SQL |
DECLARE @SiteID int, @PageID int, @NavID int, @Link varchar(100);
SET @SiteID = ?;
SET @PageID = ?;
SET @NavID = ?;
SET @Link = ?;
SELECT
'1' AS metaRank,
tblStaticPages.txtPageName,
tblStaticPages.txtFilename,
tblStaticPages.txtMetaTitle,
tblStaticPages.txtMetaDescription,
tblStaticPages.txtMetaKeywords,
tblStaticPages.ysnActive,
0 AS ysnPrimary
FROM tblStaticPages
WHERE tblStaticPages.PK_autStaticPageID = @PageID
AND tblStaticPages.ysnActive = 1
AND tblStaticPages.FK_lngSiteID = @SiteID
UNION ALL
SELECT
'2' AS metaRank,
tblNavigation.txtNavigationName,
tblNavigation.txtNavigationLink,
tblNavigation.txtMetaTitle,
tblNavigation.txtMetaDescription,
tblNavigation.txtMetaKeywords,
tblNavigation.ysnActive,
tblNavigation.ysnPrimary
FROM tblNavigation
WHERE tblNavigation.PK_autNavigationID = @NavID
AND tblNavigation.ysnDeleted = 0
AND tblNavigation.FK_lngSiteID = @SiteID
UNION ALL
SELECT
'2' AS metaRank,
tblNavigation.txtNavigationName,
tblNavigation.txtNavigationLink,
tblNavigation.txtMetaTitle,
tblNavigation.txtMetaDescription,
tblNavigation.txtMetaKeywords,
tblNavigation.ysnActive,
tblNavigation.ysnPrimary
FROM tblNavigation
WHERE (
tblNavigation.txtNavigationLink = @Link
OR tblNavigation.txtNavigationLink LIKE '%blog%'
)
AND tblNavigation.ysnDeleted = 0
AND tblNavigation.FK_lngSiteID = @SiteID
ORDER BY metaRank, ysnActive DESC, ysnPrimary DESC |