SQL Error: Deadlock found when trying to get lock; try restarting transaction at /var/www/mmozg.net/classes/modules/periodrating/mapper/PeriodRating.mapper.class.php line 81
Array ( [code] => 1213 [message] => Deadlock found when trying to get lock; try restarting transaction [query] => INSERT INTO x50_period_rating (blog_id, by_date, daily_rating, weekly_rating, monthly_rating, yearly_rating ) SELECT b.blog_id, date(now()), 0, (SELECT ifnull(SUM(daily_rating),0) FROM x50_period_rating as rw WHERE rw.blog_id=b.blog_id AND rw.by_date>=DATE_ADD(date(now()), INTERVAL -6 DAY) ), (SELECT ifnull(SUM(daily_rating),0) FROM x50_period_rating as rm WHERE rm.blog_id=b.blog_id AND rm.by_date>=DATE_ADD(date(now()), INTERVAL -29 DAY) ), (SELECT ifnull(SUM(daily_rating),0) FROM x50_period_rating as ry WHERE ry.blog_id=b.blog_id AND ry.by_date>=DATE_ADD(date(now()), INTERVAL -1 YEAR) ) FROM x50_blog as b WHERE b.blog_type != 'personal' and not exists(SELECT pr.blog_id FROM x50_period_rating as pr WHERE b.blog_id=pr.blog_id AND pr.by_date=date(now())) [context] => /var/www/mmozg.net/classes/modules/periodrating/mapper/PeriodRating.mapper.class.php line 81 )