Class: CRatings
File: /home/c/cj33570/public_html/bitrix/modules/main/classes/mysql/ratings.php
Function: CRatingsComponentsBlog::CalcActivity
Line: 143
MySQL Query Error: INSERT INTO b_rating_component_results (RATING_ID, MODULE_ID, RATING_TYPE, NAME, COMPLEX_NAME, ENTITY_ID, ENTITY_TYPE_ID, CURRENT_VALUE) SELECT '3' as RATING_ID, 'BLOG' as MODULE_ID, 'RATING' as RATING_TYPE, 'ACTIVITY' as NAME, 'USER_BLOG_RATING_ACTIVITY' as COMPLEX_NAME, ENTITY_ID, 'USER' ENTITY_TYPE_ID, SUM(CURRENT_VALUE) CURRENT_VALUE FROM ( SELECT AUTHOR_ID as ENTITY_ID, SUM(IF(TO_DAYS(DATE_PUBLISH) > TO_DAYS(NOW())-1, 1, 0))*0.4 + SUM(IF(TO_DAYS(DATE_PUBLISH) > TO_DAYS(NOW())-7, 1, 0))*0.2+ COUNT(*)*0.1 as CURRENT_VALUE FROM b_blog_post WHERE DATE_PUBLISH > DATE_SUB(NOW(), INTERVAL 30 DAY) AND PUBLISH_STATUS = 'P' GROUP BY AUTHOR_ID UNION ALL SELECT AUTHOR_ID as ENTITY_ID, SUM(IF(TO_DAYS(DATE_CREATE) > TO_DAYS(NOW())-1, 1, 0))*0.2 + SUM(IF(TO_DAYS(DATE_CREATE) > TO_DAYS(NOW())-7, 1, 0))*0.1 + COUNT(*)*0.05 as CURRENT_VALUE FROM b_blog_comment WHERE DATE_CREATE > DATE_SUB(NOW(), INTERVAL 30 DAY) AND PUBLISH_STATUS = 'P' GROUP BY AUTHOR_ID ) q WHERE ENTITY_ID > 0 GROUP BY ENTITY_ID[Duplicate entry '2147483647' for key 'PRIMARY']

DB query error.
Please try later.