MYSQL ERROR : Unknown column 'bloPost.isFeatured' in 'field list'
Query :
SELECT
bloPost.blogKey,
bloPost.blogID,
bloPost.publishedDate,
bloPost.isCommentAllowed,
bloPost.isFeatured,
bpostDet.blogTitle,
bpostDet.blogContent,
bpostDet.blogImage,
bpostDet.blogMetaTitle,
bpostDet.blogMetaDescription,
bpostDet.blogMetaKeywords
,CONCAT(admUsr.adminUserFirstName,' ',admUsr.adminUserLastName) AS adminname
,(SELECT COUNT(DISTINCT bCom.blogCommentID)
FROM
dp_blog_comments AS bCom
WHERE (bloPost.blogID = bCom.blogID
AND bCom.commentStatus = 'Active'
)) AS commentCount
,(SELECT GROUP_CONCAT((blogTag.blogTagID) SEPARATOR ',') FROM
dp_blog_tag_to_post AS tagToPost
LEFT JOIN
dp_blog_tags AS blogTag
ON blogTag.blogTagID = tagToPost.blogTagID AND blogTag.blogTagStatus = 'Active'
LEFT JOIN
dp_blog_tag_details AS blogTagDet
ON blogTagDet.blogTagID = blogTag.blogTagID AND blogTagDet.languageID = '1'
WHERE
tagToPost.blogID = bloPost.blogID
) AS blogTags
,(SELECT GROUP_CONCAT(bCatDet.blogCategoryID SEPARATOR ',')
FROM dp_blog_to_category as bToCat
LEFT JOIN dp_blog_categories as bCat
ON ( bToCat.blogCategoryID=bCat.blogCategoryID AND bCat.blogCategoryStatus = 'Active')
LEFT JOIN
dp_blog_category_details as bCatDet
ON (bCat.blogCategoryID=bCatDet.blogCategoryID AND bCatDet.languageID='1')
WHERE (bloPost.blogID=bToCat.blogID) GROUP BY bToCat.blogID) AS categoryIDs
FROM
dp_blog_posts AS bloPost
INNER JOIN
dp_blog_post_details AS bpostDet
ON bloPost.blogID = bpostDet.blogID
AND bpostDet.languageID IN (0,1)
LEFT JOIN
dp_admin_users as admUsr
ON (admUsr.adminUserID=bloPost.createdBy)
WHERE bloPost.blogStatus ='publish' AND bloPost.blogID='3' AND (FIND_IN_SET('0',viewedBy )
OR viewedBy ='' OR viewedBy IS NULL)
MYSQL ERROR : Unknown column 'bpost.isFeatured' in 'field list'
Query : SELECT
SQL_CALC_FOUND_ROWS
bpost.blogID,
bpost.blogKey,
bpost.publishedDate,
bpost.isCommentAllowed,
bpost.isFeatured,
bpostDet.blogTitle,
CONCAT(usr.adminUserFirstName,' ',usr.adminUserLastName) AS fullName,
(SELECT COUNT(DISTINCT bCom.blogCommentID)
FROM
dp_blog_comments AS bCom
WHERE
(bpost.blogID = bCom.blogID
AND bCom.commentStatus = 'Active')
) AS commentCount,
(SELECT GROUP_CONCAT(DISTINCT bCatDet.blogCategoryID SEPARATOR ',')
FROM dp_blog_to_category as bToCat
LEFT JOIN dp_blog_categories as bCat
ON ( bToCat.blogCategoryID=bCat.blogCategoryID AND bCat.blogCategoryStatus = 'Active')
LEFT JOIN
dp_blog_category_details as bCatDet
ON (bCat.blogCategoryID=bCatDet.blogCategoryID AND bCatDet.languageID='1')
WHERE (bpost.blogID=bToCat.blogID) GROUP BY bToCat.blogID) AS categoryIDs,
(SELECT GROUP_CONCAT(DISTINCT tToPost.blogTagID SEPARATOR ',')
FROM
dp_blog_tag_to_post as tToPost
LEFT JOIN
dp_blog_tags as bTag
ON
tToPost.blogTagID=bTag.blogTagID
AND bTag.blogTagStatus = 'Active'
LEFT JOIN
dp_blog_tag_details as bTagDet
ON
bTag.blogTagID=bTagDet.blogTagID
AND bTagDet.languageID='1'
WHERE (bpost.blogID=tToPost.blogID)
) AS tagNames,
bpostDet.blogContent,
bpostDet.blogImage,
(SELECT GROUP_CONCAT(DISTINCT bCatDet.blogCategoryName SEPARATOR ',')
FROM dp_blog_to_category as bToCat
LEFT JOIN dp_blog_categories as bCat
ON ( bToCat.blogCategoryID=bCat.blogCategoryID AND bCat.blogCategoryStatus = 'Active')
LEFT JOIN
dp_blog_category_details as bCatDet
ON (bCat.blogCategoryID=bCatDet.blogCategoryID AND bCatDet.languageID='1')
WHERE (bpost.blogID=bToCat.blogID) GROUP BY bToCat.blogID) AS categorynames
FROM
dp_blog_posts AS bpost
INNER JOIN
dp_blog_post_details AS bpostDet
ON
(bpost.blogID = bpostDet.blogID) AND bpostDet.languageID IN (0,1)
LEFT JOIN
dp_admin_users as usr
ON
(usr.adminUserID=bpost.createdBy)
LEFT JOIN
dp_blog_to_category as bToCat
ON
(bpost.blogID=bToCat.blogID)
LEFT JOIN
dp_blog_categories as bCat
ON
(bToCat.blogCategoryID=bCat.blogCategoryID
AND bCat.blogCategoryStatus = 'Active')
LEFT JOIN
dp_blog_category_details as bCatDet
ON
(bCat.blogCategoryID=bCatDet.blogCategoryID
AND bCatDet.languageID='1')
LEFT JOIN
dp_blog_tag_to_post as tToPost
ON
(bpost.blogID=tToPost.blogID)
LEFT JOIN
dp_blog_tags as bTag
ON
(tToPost.blogTagID=bTag.blogTagID
AND bTag.blogTagStatus = 'Active')
LEFT JOIN
dp_blog_tag_details as bTagDet
ON
(bTag.blogTagID=bTagDet.blogTagID
AND bTagDet.languageID='1' )
WHERE bpost.blogStatus = 'publish' AND (FIND_IN_SET('0',bpost.viewedBy )
OR bpost.viewedBy ='' OR bpost.viewedBy IS NULL) GROUP BY bpost.blogID ORDER BY bpost.blogID DESC LIMIT 0,6