From 3ccd6101ee5a9f351d9de8ab5a89077199897446 Mon Sep 17 00:00:00 2001 From: Dave Morriss Date: Thu, 12 Oct 2023 19:36:03 +0100 Subject: [PATCH] Removed unnecessary computations from query_next_available_episode --- templates/queries-index-mysql.tpl.html | 3 --- templates/queries-index-sqlite.tpl.html | 3 --- 2 files changed, 6 deletions(-) diff --git a/templates/queries-index-mysql.tpl.html b/templates/queries-index-mysql.tpl.html index 8d60698..9172907 100644 --- a/templates/queries-index-mysql.tpl.html +++ b/templates/queries-index-mysql.tpl.html @@ -22,9 +22,6 @@ SELECT empty_slot AS next_id, ADDDATE(prev_date,date_offset) AS next_date, - YEAR(ADDDATE(prev_date,date_offset)) AS last_year, - MONTH(ADDDATE(prev_date,date_offset)) AS last_month, - DAY(ADDDATE(prev_date,date_offset)) AS last_day, DATEDIFF(ADDDATE(prev_date,date_offset),NOW()) AS delta_days FROM free_slot ' diff --git a/templates/queries-index-sqlite.tpl.html b/templates/queries-index-sqlite.tpl.html index 34b815f..d18b3ba 100644 --- a/templates/queries-index-sqlite.tpl.html +++ b/templates/queries-index-sqlite.tpl.html @@ -22,9 +22,6 @@ SELECT empty_slot AS next_id, DATE (prev_date, date_offset) AS next_date, - strftime(\'%Y\', DATE (prev_date, date_offset)) AS last_year, - strftime(\'%m\', DATE (prev_date, date_offset)) AS last_month, - strftime(\'%d\', DATE (prev_date, date_offset)) AS last_day, printf(\'%i\',abs(julianday(DATE (prev_date, date_offset)) - julianday(\'now\') + 1)) AS delta_days FROM free_slot '