View | Details | Raw Unified | Return to bug 16219
Collapse All | Expand All

(-)a/misc/cronjobs/runreport.pl (-5 / +7 lines)
Lines 67-73 runreport.pl [ -h | -m ] [ -v ] reportID [ reportID ... ] Link Here
67
   --to=s          e-mail address to send report to
67
   --to=s          e-mail address to send report to
68
   --from=s        e-mail address to send report from
68
   --from=s        e-mail address to send report from
69
   --subject=s     subject for the e-mail
69
   --subject=s     subject for the e-mail
70
   --params=s      parameters for the report
70
   --param=s      parameters for the report
71
   --store-results store the result of the report
71
   --store-results store the result of the report
72
   --csv-header    add column names as first line of csv output
72
   --csv-header    add column names as first line of csv output
73
73
Lines 123-131 E-mail address to send report from. Defaults to KohaAdminEmailAddress. Link Here
123
123
124
Subject for the e-mail message. Defaults to "Koha Saved Report"
124
Subject for the e-mail message. Defaults to "Koha Saved Report"
125
125
126
=item B<--params>
126
=item B<--param>
127
127
128
Repeatable, should provide one param per param requested for the report
128
Repeatable, should provide one param per param requested for the report.
129
Report params are not combined as on the staff side, so you may need to repeat
130
params.
129
131
130
=item B<--store-results>
132
=item B<--store-results>
131
133
Lines 263-269 foreach my $report_id (@ARGV) { Link Here
263
    }
265
    }
264
266
265
    # convert SQL parameters to placeholders
267
    # convert SQL parameters to placeholders
266
    $sql =~ s/(<<.*?>>)/\?/g;
268
    my $params_needed = ( $sql =~ s/(<<.*?>>)/\?/g );
269
    die("You supplied ". scalar @params . " parameter(s) and $params_needed are required by the report") if scalar @params != $params_needed;
267
270
268
    my ($sth) = execute_query( $sql, undef, undef, \@params, $report_id );
271
    my ($sth) = execute_query( $sql, undef, undef, \@params, $report_id );
269
    my $count = scalar($sth->rows);
272
    my $count = scalar($sth->rows);
270
- 

Return to bug 16219