summaryrefslogtreecommitdiffstats
path: root/collectstats.pl
diff options
context:
space:
mode:
authormkanat%kerio.com <>2005-02-20 16:53:16 +0100
committermkanat%kerio.com <>2005-02-20 16:53:16 +0100
commite547dd6d7b7b9a3c2135c56dd6b7a433743fd4b1 (patch)
tree179cd1f21b8e26b2cf2feec6ebfe30ddbd33afdd /collectstats.pl
parent335b8c125f821a96ddfd769163c92c1d74ce62f6 (diff)
downloadbugzilla-e547dd6d7b7b9a3c2135c56dd6b7a433743fd4b1.tar.gz
bugzilla-e547dd6d7b7b9a3c2135c56dd6b7a433743fd4b1.tar.xz
Bug 280499: Replace "TO_DAYS()" with Bugzilla::DB function call
Patch By Tomas Kopal <Tomas.Kopal@altap.cz> r=mkanat, a=justdave
Diffstat (limited to 'collectstats.pl')
-rwxr-xr-xcollectstats.pl9
1 files changed, 5 insertions, 4 deletions
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));