You're right. Thanks, that worked great!
I have another global that gives me a total daily search count. Can you tell me how do I do the same in it?
# Gets the current date.
Links::init_date();
GT::Date::date_set_format($CFG->{'date_db_format'});
my $date = GT::Date::date_get();
my ($total) = $DB->table('SearchLogDaily')->select(['SUM(HitCount)'])->fetchrow_array;
if ($total < 1){
$total = '0';
}
return $total;
}
Sean
I have another global that gives me a total daily search count. Can you tell me how do I do the same in it?
Code:
sub { # Gets the current date.
Links::init_date();
GT::Date::date_set_format($CFG->{'date_db_format'});
my $date = GT::Date::date_get();
my ($total) = $DB->table('SearchLogDaily')->select(['SUM(HitCount)'])->fetchrow_array;
if ($total < 1){
$total = '0';
}
return $total;
}
Sean