Fix comments and code in clisverstats.
Signed-off-by: Thomas Hochstein <thh@thh.name>
This commit is contained in:
parent
28157570f1
commit
0ee389fc42
|
@ -86,7 +86,7 @@ elsif ($OptType eq 'host') {
|
|||
### init database
|
||||
my $DBHandle = InitDB(\%Conf,1);
|
||||
|
||||
### get time period and newsgroups, prepare SQL 'WHERE' clause
|
||||
### get time period and names, prepare SQL 'WHERE' clause
|
||||
# get time period
|
||||
# and set caption for output and expression for SQL 'WHERE' clause
|
||||
my ($CaptionPeriod,$SQLWherePeriod) = &GetTimePeriod($OptMonth);
|
||||
|
@ -94,7 +94,7 @@ my ($CaptionPeriod,$SQLWherePeriod) = &GetTimePeriod($OptMonth);
|
|||
&Bleat(2,"--month option has an invalid format - ".
|
||||
"please use 'YYYY-MM', 'YYYY-MM:YYYY-MM' or 'ALL'!") if !$CaptionPeriod;
|
||||
# get list of hosts and set expression for SQL 'WHERE' clause
|
||||
# with placeholders as well as a list of newsgroup to bind to them
|
||||
# with placeholders as well as a list of names to bind to them
|
||||
my ($SQLWhereNames,@SQLBindNames);
|
||||
if ($OptNames) {
|
||||
($SQLWhereNames,@SQLBindNames) = &SQLGroupList($OptNames,$OptType);
|
||||
|
@ -138,7 +138,7 @@ if ($OptReportType and $OptReportType ne 'default') {
|
|||
$SQLSelect = "month,$OptType,postings";
|
||||
};
|
||||
|
||||
### get length of longest newsgroup name delivered by query
|
||||
### get length of longest name delivered by query
|
||||
### for formatting purposes
|
||||
my $Field = ($GroupBy eq 'month') ? $OptType : 'month';
|
||||
my ($MaxLength,$MaxValLength) = &GetMaxLength($DBHandle,$Conf{'DBTable'},
|
||||
|
@ -155,7 +155,7 @@ $DBQuery = $DBHandle->prepare(sprintf('SELECT %s FROM %s.%s %s %s %s',
|
|||
$SQLOrderClause));
|
||||
# execute query
|
||||
$DBQuery->execute(@SQLBindNames)
|
||||
or &Bleat(2,sprintf("Can't get %ss data for %s from %s.%s: %s\n",
|
||||
or &Bleat(2,sprintf("Can't get %s data for %s from %s.%s: %s\n",
|
||||
$OptType,$CaptionPeriod,$Conf{'DBDatabase'},$Conf{'DBTable'},
|
||||
$DBI::errstr));
|
||||
|
||||
|
|
Loading…
Reference in a new issue