SELECT value FROM e1xlz_jreviews_config WHERE id = 'cms_secret'
SELECT name FROM e1xlz_jreviews_addons WHERE state = 1 ORDER BY ordering
INSERT INTO e1xlz_jreviews_config ( id, value ) VALUES ('last_cache_clean','1750225747') ON DUPLICATE KEY UPDATE value = VALUES(value)
DELETE
FROM e1xlz_jreviews_registration
WHERE
session_time < 1750222147
INSERT INTO e1xlz_jreviews_config ( id, value ) VALUES ('ranks_rebuild_last','1750225747') ON DUPLICATE KEY UPDATE value = VALUES(value)
SELECT
Review.id
FROM e1xlz_jreviews_comments as Review
WHERE
Review.mode = "com_content"
AND Review.pid NOT IN (
SELECT id from e1xlz_content
)
DELETE
FROM
e1xlz_jreviews_reviewer_ranks
WHERE
user_id = 0
OR user_id NOT IN (
SELECT
userid
FROM
e1xlz_jreviews_comments
WHERE
published = 1
)
OR user_id NOT IN (
SELECT id FROM e1xlz_users WHERE block = 0
)
INSERT INTO
e1xlz_jreviews_reviewer_ranks (user_id, reviews, votes_percent_helpful, votes_total)
(
SELECT
userid AS user_id,
COUNT(*) AS reviews,
(IF(SUM(vote_total)>0,SUM(vote_helpful)/SUM(vote_total),0)) AS votes_percent_helpful,
SUM(vote_total) AS votes_total
FROM
e1xlz_jreviews_comments AS Review
RIGHT JOIN
e1xlz_users AS User ON User.id = Review.userid AND User.block = 0
WHERE
userid > 0
AND published = 1
GROUP BY
userid
ORDER BY
NULL
)
ON DUPLICATE KEY UPDATE
reviews = VALUES(reviews),
votes_percent_helpful = VALUES(votes_percent_helpful),
votes_total = VALUES(votes_total);
INSERT INTO
e1xlz_jreviews_reviewer_ranks (user_id, `rank`)
(
SELECT
user_id,
@curRank := @curRank + 1 AS `rank`
FROM
e1xlz_jreviews_reviewer_ranks, (SELECT @curRank := 0) r
ORDER BY
reviews DESC, votes_percent_helpful DESC
)
ON DUPLICATE KEY UPDATE
`rank` = VALUES(`rank`);
INSERT INTO e1xlz_jreviews_config ( id, value ) VALUES ('media_likes_rebuild_last','1750225747') ON DUPLICATE KEY UPDATE value = VALUES(value)
INSERT INTO
e1xlz_jreviews_media (media_id, likes_up, likes_total)
(SELECT
media_id AS media_id,
SUM(IF(vote = 1, 1, 0)) AS likes_up,
COUNT(*) AS likes_total
FROM e1xlz_jreviews_media_likes
GROUP BY media_id
ORDER BY NULL
)
ON DUPLICATE KEY UPDATE
likes_up = VALUES(likes_up),
likes_total = VALUES(likes_total);
SELECT @max_likes := MAX(likes_total) FROM e1xlz_jreviews_media;
INSERT INTO
e1xlz_jreviews_media (media_id, likes_rank)
(SELECT
media_id AS media_id,
(SUM(IF(vote = 1, 1,0))/COUNT(*)) * (COUNT(*)/@max_likes) * 16000000 AS likes_rank
FROM
e1xlz_jreviews_media_likes
GROUP BY
media_id
ORDER BY
NULL
)
ON DUPLICATE KEY UPDATE
likes_rank = VALUES(likes_rank);
SELECT
count(*)
FROM
e1xlz_jreviews_categories AS JreviewCategory
WHERE
JreviewCategory.id = 10
AND
JreviewCategory.option = 'com_content'
AND
JreviewCategory.criteriaid > 0
SELECT
JreviewsCategory.id
FROM
e1xlz_jreviews_categories AS JreviewsCategory
LEFT JOIN
e1xlz_categories AS Category On JreviewsCategory.id = Category.id
WHERE
JreviewsCategory.`option`= "com_content"
AND Category.published >= 0
AND Category.access IN ( 1)
SELECT Listing.id AS `Listing.listing_id`,
Listing.alias AS `Listing.slug`,
Listing.title AS `Listing.title`,
Listing.introtext AS `Listing.summary`,
Listing.fulltext AS `Listing.description`,
Listing.images AS `Listing.images`,
Listing.hits AS `Listing.hits`,
Listing.catid AS `Listing.cat_id`,
Listing.created_by AS `Listing.user_id`,
Listing.created_by_alias AS `Listing.author_alias`,
Listing.created AS `Listing.created`,
Listing.modified AS `Listing.modified`,
Listing.access AS `Listing.access`,
Listing.state AS `Listing.state`,
Listing.publish_up AS `Listing.publish_up`,
Listing.publish_down AS `Listing.publish_down`,
Listing.metakey AS `Listing.metakey`,
Listing.metadesc AS `Listing.metadesc`,
'com_content' AS `Listing.extension`,
Field.featured AS `Listing.featured`,
JreviewsCategory.criteriaid AS `ListingType.listing_type_id`,
Category.id AS `Category.cat_id`,
Category.title AS `Category.title`,
Category.alias AS `Category.slug`,
Category.access AS `Category.access`,
Category.params AS `Category.params`,
Directory.id AS `Directory.dir_id`,
Directory.title AS `Directory.title`,
Directory.slug AS `Directory.slug`,
User.id AS `User.user_id`,
User.name AS `User.name`,
User.username AS `User.username`,
User.email AS `User.email`,
User.block AS `User.block`,
Claim.approved AS `Claim.approved`,
Totals.user_rating AS `Review.user_rating`,
Totals.user_rating_count AS `Review.user_rating_count`,
Totals.user_criteria_rating AS `Review.user_criteria_rating`,
Totals.user_criteria_rating_count AS `Review.user_criteria_rating_count`,
Totals.user_comment_count AS `Review.user_review_count`,
Totals.editor_rating AS `Review.editor_rating`,
Totals.editor_rating_count AS `Review.editor_rating_count`,
Totals.editor_criteria_rating AS `Review.editor_criteria_rating`,
Totals.editor_criteria_rating_count AS `Review.editor_criteria_rating_count`,
Totals.editor_comment_count AS `Review.editor_review_count`,
Totals.media_count AS `Listing.media_count`,
Totals.video_count AS `Listing.video_count`,
Totals.photo_count AS `Listing.photo_count`,
Totals.audio_count AS `Listing.audio_count`,
Totals.attachment_count AS `Listing.attachment_count`,
(Totals.media_count - Totals.media_count_user) AS `Listing.media_count_owner`,
(Totals.video_count - Totals.video_count_user) AS `Listing.video_count_owner`,
(Totals.photo_count - Totals.photo_count_user) AS `Listing.photo_count_owner`,
(Totals.audio_count - Totals.audio_count_user) AS `Listing.audio_count_owner`,
(Totals.attachment_count - Totals.attachment_count_user) AS `Listing.attachment_count_owner`,
Totals.media_count_user AS `Listing.media_count_user`,
Totals.video_count_user AS `Listing.video_count_user`,
Totals.photo_count_user AS `Listing.photo_count_user`,
Totals.audio_count_user AS `Listing.audio_count_user`,
Totals.attachment_count_user AS `Listing.attachment_count_user`
FROM e1xlz_content AS Listing
LEFT JOIN e1xlz_jreviews_listing_totals AS Totals ON Totals.listing_id = Listing.id AND Totals.extension = 'com_content'
LEFT JOIN e1xlz_jreviews_content AS Field ON Field.contentid = Listing.id
LEFT JOIN e1xlz_jreviews_categories AS JreviewsCategory ON JreviewsCategory.id = Listing.catid AND JreviewsCategory.`option` = 'com_content'
LEFT JOIN e1xlz_categories AS Category ON Category.id = Listing.catid AND Category.extension = 'com_content'
LEFT JOIN e1xlz_jreviews_directories AS Directory ON Directory.id = JreviewsCategory.dirid
LEFT JOIN e1xlz_users AS User ON User.id = Listing.created_by
LEFT JOIN e1xlz_jreviews_claims AS Claim ON Claim.listing_id = Listing.id AND Claim.user_id = Listing.created_by AND Claim.approved = 1
WHERE 1 = 1 AND (
(Listing.id = 67)
AND Listing.catid IN (10)
AND Listing.state >= 0
)
SELECT
groupid
FROM e1xlz_jreviews_groups
WHERE
groupid IN (1)
AND type = 'content'
SELECT
Field.fieldid AS `Field.field_id`,
Field.groupid AS `Field.group_id`,
Field.name AS `Field.name`,
Field.title AS `Field.title`,
Field.showtitle AS `Field.showTitle`,
Field.description AS `Field.description`,
Field.required AS `Field.required`,
Field.type AS `Field.type`,
Field.location AS `Field.location`,
Field.options AS `Field.params`,
Field.contentview AS `Field.contentView`,
Field.listview AS `Field.listView`,
Field.compareview AS `Field.compareView`,
Field.listsort AS `Field.listSort`,
Field.search AS `Field.search`,
Field.access AS `Field.access`,
Field.access_view AS `Field.accessView`,
Field.published As `Field.published`,
Field.ordering AS `Field.ordering`,
`Group`.groupid AS `Group.group_id`,
`Group`.title AS `Group.title`,
`Group`.name AS `Group.name`,
`Group`.showtitle AS `Group.showTitle`,
`Group`.ordering AS `Group.ordering`,
`Group`.control_field AS `Group.control_field`,
`Group`.control_value AS `Group.control_value`
FROM
e1xlz_jreviews_fields AS Field
LEFT JOIN
e1xlz_jreviews_groups AS `Group` ON `Group`.groupid = Field.groupid
WHERE
Field.published = 1
AND Field.location = 'content'
AND Field.groupid IN ( 1)
SELECT
Listing.contentid AS element_id,jr_marca,jr_numerodeserie,jr_ano,jr_precio
FROM
e1xlz_jreviews_content AS Listing
WHERE
Listing.contentid IN (67)
SELECT
content_id AS listing_id, count(*) AS favored FROM e1xlz_jreviews_favorites AS Favorite
WHERE
Favorite.content_id IN (67)
GROUP BY
listing_id
SELECT
tmp.media_id,
tmp.listing_id,
tmp.review_id,
tmp.media_type,
tmp.media_function,
tmp.likes_rank,
tmp.main_media,
media.likes_up,
media.likes_total,
media.created,
media.listing_id,
media.review_id,
media.user_id,
media.filename,
media.file_extension,
media.rel_path,
media.title,
media.description,
media.duration,
media.media_info,
media.metadata,
media.embed,
media.published,
media.approved,
media.access,
media.views,
media.filesize,
media.extension
FROM (
SELECT
media_id,
listing_id,
review_id,
media_type,
media_function,
main_media,
views,
likes_rank,
created,
ordering,
CASE
WHEN @id != listing_id AND media_type = 'photo' THEN @photo := 1
ELSE IF(media_type = 'photo' ,@photo := @photo + 1,NULL)
END AS photo_rank,
CASE
WHEN @id != listing_id AND media_type = 'video' THEN @video := 1
ELSE IF(media_type = 'video' ,@video := @video + 1,NULL)
END AS video_rank,
CASE
WHEN @id != listing_id AND media_type = 'attachment' THEN @attachment := 1
ELSE IF(media_type = 'attachment',@attachment := @attachment + 1,NULL)
END AS attachment_rank,
CASE
WHEN @id != listing_id AND media_type = 'audio' THEN @audio := 1
ELSE IF(media_type = 'audio',@audio := @audio + 1,NULL)
END AS audio_rank,
@id := listing_id
FROM (
SELECT
media_id, review_id, listing_id, user_id, media_type, media_function, likes_rank, likes_up, likes_total, created, main_media, ordering, views
FROM
e1xlz_jreviews_media
WHERE
listing_id IN (67)
AND published = 1 AND approved = 1
AND access IN (1)
AND extension = 'com_content'
) mtmp
JOIN (SELECT @id := NULL, @photo := 0, @video := 0, @attachment := 0, @audio := 0) r
ORDER BY
main_media DESC, listing_id, media_type, created DESC
) tmp
JOIN
e1xlz_jreviews_media AS media ON media.media_id = tmp.media_id
WHERE
(tmp.photo_rank >= 0) OR
(tmp.video_rank BETWEEN 1 AND 7) OR
(tmp.attachment_rank > 0) OR
(tmp.audio_rank > 0)
ORDER BY
tmp.main_media DESC, tmp.listing_id, tmp.media_type, tmp.created DESC
SELECT
rating_range, count(*) AS count
FROM
(SELECT
CASE WHEN ROUND(rating,1) > 0 AND rating < 1.5 THEN 1
WHEN ROUND(rating,1) >= 1.5 AND ROUND(rating,1) < 2.5 THEN 2
WHEN ROUND(rating,1) >= 2.5 AND ROUND(rating,1) < 3.5 THEN 3
WHEN ROUND(rating,1) >= 3.5 AND ROUND(rating,1) < 4.5 THEN 4
WHEN ROUND(rating,1) >= 4.5 THEN 5
END as rating_range
FROM
e1xlz_jreviews_comments
WHERE
pid = 67
AND published = 1
AND mode = 'com_content'
AND rating > 0
AND author = 0
) AS ReviewRange
GROUP BY
rating_range
SELECT
path
FROM
e1xlz_categories
WHERE
id IN (10)
SELECT
ParentCategory.id AS `Category.cat_id`,
ParentCategory.lft AS `Category.lft`,
ParentCategory.title AS `Category.title`,
IF(JreviewsCategory.page_title <> '',JreviewsCategory.page_title,ParentCategory.title) AS `Category.title_seo`,
JreviewsCategory.title_override AS `Category.title_override`,
ParentCategory.alias AS `Category.slug`,
ParentCategory.description AS `Category.description`,
ParentCategory.level AS `Category.level`,
ParentCategory.published AS `Category.published`,
ParentCategory.access AS `Category.access`,
ParentCategory.params AS `Category.params`,
ParentCategory.parent_id AS `Category.parent_id`,
ParentCategory.metadesc AS `Category.metadesc`,
ParentCategory.metakey AS `Category.metakey`,
IF(ParentCategory.metadesc <> '' AND JreviewsCategory.desc_override =1,ParentCategory.metadesc,ParentCategory.description) AS `Category.description`,
JreviewsCategory.criteriaid AS `ListingType.listing_type_id`,
JreviewsCategory.tmpl AS `Category.tmpl`,
JreviewsCategory.tmpl_suffix AS `Category.tmpl_suffix`,
JreviewsCategory.dirid AS `Directory.dir_id`,
Directory.slug AS `Directory.slug`,
Directory.title AS `Directory.title`,
Directory.description AS `Directory.description`
FROM
e1xlz_categories AS ParentCategory
INNER JOIN
e1xlz_jreviews_categories AS JreviewsCategory ON JreviewsCategory.id = ParentCategory.id AND JreviewsCategory.`option` = 'com_content'
LEFT JOIN
e1xlz_jreviews_directories AS Directory ON JreviewsCategory.dirid = Directory.id
WHERE
ParentCategory.path IN ( 'frontpage-blog')
ORDER BY
ParentCategory.lft
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`,
User.block AS `User.block`,
Review.email AS `User.email`,
Review.ipaddress AS `User.ipaddress`,
ReviewerRank.`rank` AS `User.reviewer_rank`,
ReviewerRank.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`,
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)*Review.vote_helpful 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`,
Review.listing_type_id AS `ListingType.listing_type_id`,
Review.owner_reply_approved As `Review.owner_reply_approved`,
Review.owner_reply_text As `Review.owner_reply_text`
FROM e1xlz_jreviews_comments AS Review
LEFT JOIN e1xlz_users AS User ON Review.userid = User.id
LEFT JOIN e1xlz_jreviews_reviewer_ranks AS ReviewerRank ON Review.userid = ReviewerRank.user_id
LEFT JOIN e1xlz_content AS Listing ON Listing.id = Review.pid
LEFT JOIN e1xlz_jreviews_listing_totals AS Totals ON Totals.listing_id = Review.pid AND Totals.extension = 'com_content'
LEFT JOIN e1xlz_jreviews_categories AS JreviewsCategory ON JreviewsCategory.id = Listing.catid AND JreviewsCategory.`option` = 'com_content'
WHERE 1 = 1 AND (
Review.pid = 67
AND Review.mode = 'com_content'
AND Review.published = 1
AND Review.author = 0
AND JreviewsCategory.option = 'com_content'
)
ORDER BY `Review.created` DESC
LIMIT 5
SELECT
groupid
FROM e1xlz_jreviews_groups
WHERE
groupid IN (1)
AND type = 'review'
SELECT COUNT(*)
FROM e1xlz_jreviews_comments AS Review
WHERE 1 = 1 AND (
Review.pid = 67
AND Review.mode = 'com_content'
AND Review.published >= 0
AND Review.ipaddress = '10.3.139.128'
)
SELECT COUNT(*)
FROM e1xlz_jreviews_comments AS Review
WHERE 1 = 1 AND (
Review.pid = 67
AND Review.mode = 'com_content'
AND Review.published >= 0
AND Review.author = 0
AND Review.userid = 0
)
SELECT COUNT(*)
FROM e1xlz_jreviews_comments AS Review
WHERE 1 = 1 AND (
Review.pid = 67
AND Review.mode = 'com_content'
AND Review.published >= 0
AND Review.author = 1
AND Review.userid = 0
)