From e547dd6d7b7b9a3c2135c56dd6b7a433743fd4b1 Mon Sep 17 00:00:00 2001 From: "mkanat%kerio.com" <> Date: Sun, 20 Feb 2005 15:53:16 +0000 Subject: Bug 280499: Replace "TO_DAYS()" with Bugzilla::DB function call Patch By Tomas Kopal r=mkanat, a=justdave --- collectstats.pl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'collectstats.pl') diff --git a/collectstats.pl b/collectstats.pl index cf863f405..ae44b0b75 100755 --- a/collectstats.pl +++ b/collectstats.pl @@ -283,10 +283,11 @@ sub regenerate_stats { # Determine the start date from the date the first bug in the # database was created, and the end date from the current day. # If there were no bugs in the search, return early. - SendSQL("SELECT to_days(creation_ts) AS start, " . - "to_days(current_date) AS end, " . - "to_days('1970-01-01') " . - "FROM bugs $from_product WHERE to_days(creation_ts) != 'NULL' " . + SendSQL("SELECT " . $dbh->sql_to_days('creation_ts') . " AS start, " . + $dbh->sql_to_days('current_date') . " AS end, " . + $dbh->sql_to_days("'1970-01-01'") . + " FROM bugs $from_product WHERE " . + $dbh->sql_to_days('creation_ts') . " != 'NULL' " . $and_product . "ORDER BY start " . $dbh->sql_limit(1)); -- cgit v1.2.3-24-g4f1b