SELECT
id, language
FROM
sdxbv_menu
WHERE
link LIKE "%com_comprofiler&view=userprofile" AND published = 1 AND type = "component"
SELECT
id, language
FROM
sdxbv_menu
WHERE
link LIKE "%com_comprofiler&view=registers" AND published = 1 AND type = "component"
SELECT
Category.id
FROM
sdxbv_categories AS Category,
sdxbv_categories AS ParentCategory
WHERE
Category.published = 1
AND Category.extension = "com_content"
AND Category.access IN ( 1)
AND Category.lft BETWEEN ParentCategory.lft AND ParentCategory.rgt
AND ParentCategory.id = 208
SELECT id FROM sdxbv_jreviews_categories WHERE `option` = "com_content"
SELECT Review.id AS `Review.review_id`,
Review.pid AS `Review.listing_id`,
Review.mode AS `Review.extension`,
Review.created AS `Review.created`,
Review.modified AS `Review.modified`,
Review.userid AS `Review.user_id`,
User.id AS `User.user_id`,
CASE WHEN CHAR_LENGTH(User. name) THEN User. name ELSE Review.name END AS `User.name`,
CASE WHEN CHAR_LENGTH(User. username) THEN User.username ELSE Review.username END AS `User.username`,
Review.email AS `User.email`,
Review.ipaddress AS `User.ipaddress`,
Rank.rank AS `User.review_rank`,
Rank.reviews AS `User.review_count`,
Review.title AS `Review.title`,
Review.comments AS `Review.comments`,
Review.posts AS `Review.posts`,
Review.author AS `Review.editor`,
Review.published AS `Review.published`,
Review.listing_type_id AS `Review.listing_type_id`,
IF(Review.rating=0,"na",Review.rating) AS `Rating.average_rating`,
Review.vote_helpful AS `Vote.yes`,
(Review.vote_total - Review.vote_helpful) AS `Vote.no`,
(Review.vote_helpful/Review.vote_total)*100 AS `Vote.helpful`,
Review.owner_reply_text AS `Review.owner_reply_text`,
Review.owner_reply_approved AS `Review.owner_reply_approved`,
Review.owner_reply_created AS `Review.owner_reply_created`,
Review.media_count AS `Review.media_count`,
Review.video_count AS `Review.video_count`,
Review.photo_count AS `Review.photo_count`,
Review.audio_count AS `Review.audio_count`,
Review.attachment_count AS `Review.attachment_count`
FROM sdxbv_jreviews_comments AS Review
LEFT JOIN sdxbv_users AS User ON Review.userid = User.id
LEFT JOIN sdxbv_jreviews_reviewer_ranks AS Rank ON Review.userid = Rank.user_id
LEFT JOIN sdxbv_content AS Listing ON Listing.id = Review.pid
LEFT JOIN sdxbv_jreviews_listing_totals AS Totals ON Totals.listing_id = Review.pid AND Totals.extension = 'com_content'
WHERE 1 = 1 AND (
Review.published = 1
AND Review.mode = 'com_content'
AND Listing.catid IN (208)
AND Listing.state = 1
AND Listing.access IN ( 1)
AND ( Listing.publish_up = "0000-00-00 00:00:00" OR Listing.publish_up <= "2016-08-01 22:00:00" )
AND ( Listing.publish_down = "0000-00-00 00:00:00" OR Listing.publish_down > "2016-07-31 22:00:00" )
)
ORDER BY Review.created DESC
LIMIT 10