}
}
+ if ($where !~ /visible/) {
+ $where .= " AND " if $where;
+ $where .= "visible = 1";
+ }
+
$query = "SELECT nr,date,description,price FROM $table";
$query .= " WHERE $where" if ($where);
$query .= " ORDER by date,nr";
+
$sth = $dbh->prepare($query);
if ($sth && (my $rc = $sth->execute) > 0) {
print " Nr. Datum Bezeichnung Betrag\n";
'hide=s' => \$data{hide},
'unhide=s' => \$data{unhide},
'year=i' => \$opt_year,
- 'direction=s' => \$opt_direction,
+ 'direction|d=s' => \$opt_direction,
'mailto:s' => \$data{mailto},
'all' => \$opt_all,
'verbose' => \$opt_verbose,