From 2623f813692b737f2aefc016910f98c88f29fd14 Mon Sep 17 00:00:00 2001 From: Brian Aker Date: Fri, 10 May 2002 23:55:38 +0000 Subject: [PATCH] *** empty log message *** --- plugins/Stats/Stats.pm | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/plugins/Stats/Stats.pm b/plugins/Stats/Stats.pm index dd31e1495..2cee9b60c 100644 --- a/plugins/Stats/Stats.pm +++ b/plugins/Stats/Stats.pm @@ -305,23 +305,26 @@ sub countCommentsDaily { ######################################################## sub countBytesByPage { my($self, $op, $yesterday) = @_; - $self->sqlSelect("sum(bytes)", "accesslog", - "op='$op' AND ts BETWEEN '$yesterday 00:00' AND '$yesterday 23:59:59'"); + my $where = "op='$op' AND "; + $where .= "ts BETWEEN '$yesterday 00:00' AND '$yesterday 23:59:59'"; + $self->sqlSelect("sum(bytes)", "accesslog", $where); } ######################################################## sub countDailyByPage { my($self, $op, $yesterday) = @_; - $self->sqlSelect("count(*)", "accesslog", - "op='$op' AND ts BETWEEN '$yesterday 00:00' AND '$yesterday 23:59:59'"); + my $where = "op='$op' AND "; + $where .= "ts BETWEEN '$yesterday 00:00' AND '$yesterday 23:59:59'"; + $self->sqlSelect("count(*)", "accesslog", $where); } ######################################################## sub countDailyByPageDistinctIPID { # This is so lame, and so not ANSI SQL -Brian my($self, $op, $yesterday) = @_; - $self->sqlSelect("count(DISTINCT host_addr)", "accesslog", - "op='$op' AND ts BETWEEN '$yesterday 00:00' AND '$yesterday 23:59:59'"); + my $where = "op='$op' AND "; + $where .= "ts BETWEEN '$yesterday 00:00' AND '$yesterday 23:59:59'"; + $self->sqlSelect("count(DISTINCT host_addr)", "accesslog", $where); } ########################################################