query
RESULTSET
query
  ARTICLEDATE ARTICLEID BLURB CAPTION CATEGORY FEATURED IMAGE PICHEIGHT PICWIDTH ROW_NUMBER TITLE
CACHED false
EXECUTIONTIME 3
SQL SELECT articles.articleid, articles.featured, image, title, blurb, picWidth, picHeight, category, articledate, ltrim(STUFF((SELECT top 1 ';' + c.caption + '' FROM article_category as c inner join articleCatLookup as ac on ac.categoryID = c.categoryid and ac.articleID = articles.articleid WHERE c.caption is not null group by c.caption, c.captionPriority order by c.captionPriority asc FOR XML PATH('')), 1, 1, '')) as caption, cast(1 as bigint) as row_number FROM articles LEFT JOIN articleCatLookup ON articles.articleID = articleCatLookup.articleID LEFT JOIN article_category ON articleCatLookup.categoryID = article_category.categoryID WHERE articleCatLookup.CategoryID = ? and DATEDIFF(D,articledate,GETDATE()) >= 0 and articles.featured = 1 ORDER BY featured asc, articles.articleDate desc, articles.articleid DESC
SQLPARAMETERS
array
1 165
query
RESULTSET
query
  ARTICLEDATE ARTICLEID BLURB CAPTION CATEGORY FEATURED IMAGE PICHEIGHT PICWIDTH ROW_NUMBER TITLE
CACHED false
EXECUTIONTIME 0
SQL SELECT articles.articleid, articles.featured, image, title, blurb, picWidth, picHeight, category, articledate, ltrim(STUFF((SELECT top 1 ';' + c.caption + '' FROM article_category as c inner join articleCatLookup as ac on ac.categoryID = c.categoryid and ac.articleID = articles.articleid WHERE c.caption is not null group by c.caption, c.captionPriority order by c.captionPriority asc FOR XML PATH('')), 1, 1, '')) as caption, cast(2 as bigint) as row_number FROM articles LEFT JOIN articleCatLookup ON articles.articleID = articleCatLookup.articleID LEFT JOIN article_category ON articleCatLookup.categoryID = article_category.categoryID WHERE articleCatLookup.CategoryID = ? and DATEDIFF(D,articledate,GETDATE()) >= 0 and articles.featured = 2 ORDER BY featured asc, articles.articleDate desc, articles.articleid DESC
SQLPARAMETERS
array
1 165