Skip to content
Snippets Groups Projects
Commit ee505395 authored by Benjamin Bellamy's avatar Benjamin Bellamy :speech_balloon:
Browse files

fix(analytics): set initial value for duration and bandwidth

parent 06279cd9
No related branches found
No related tags found
No related merge requests found
...@@ -50,8 +50,8 @@ class AddAnalyticsPodcastsProcedure extends Migration ...@@ -50,8 +50,8 @@ class AddAnalyticsPodcastsProcedure extends Migration
SET @current_hour = HOUR(@current_datetime); SET @current_hour = HOUR(@current_datetime);
IF NOT `p_bot` THEN IF NOT `p_bot` THEN
INSERT INTO `{$prefix}analytics_podcasts`(`podcast_id`, `date`) INSERT INTO `{$prefix}analytics_podcasts`(`podcast_id`, `date`, `duration`, `bandwidth`)
VALUES (p_podcast_id, @current_date) VALUES (p_podcast_id, @current_date, `p_duration`, `p_filesize`)
ON DUPLICATE KEY UPDATE ON DUPLICATE KEY UPDATE
`duration`=`duration`+`p_duration`, `duration`=`duration`+`p_duration`,
`bandwidth`=`bandwidth`+`p_filesize`, `bandwidth`=`bandwidth`+`p_filesize`,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment