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

(-)a/misc/export_borrowers.pl (-3 / +5 lines)
Lines 50-56 $0 -h Link Here
50
                            If no separator is specifield, a comma will be used.
50
                            If no separator is specifield, a comma will be used.
51
    -H, --show-header       Print field names on first row
51
    -H, --show-header       Print field names on first row
52
    -w, --where=CONDITION   Condition to filter borrowers to export
52
    -w, --where=CONDITION   Condition to filter borrowers to export
53
                            (SQL where clause)
53
                            (SQL where clause).
54
                            CONDITION must be enclosed by double quotes and
55
                            if needed, where value by single quotes.
56
                            example : --where "surname='De Lattre'"
54
    -h, --help              Show this help
57
    -h, --help              Show this help
55
58
56
USAGE
59
USAGE
Lines 88-94 my $csv = Text::CSV->new( { sep_char => $separator, binary => 1 } ); Link Here
88
91
89
# If the user did not specify any field to export, we assume he wants them all
92
# If the user did not specify any field to export, we assume he wants them all
90
# We retrieve the first borrower informations to get field names
93
# We retrieve the first borrower informations to get field names
91
my ($borrowernumber) = $sth->fetchrow_array;
94
my ($borrowernumber) = $sth->fetchrow_array or die "No borrower to export";
92
my $member = GetMemberDetails($borrowernumber);
95
my $member = GetMemberDetails($borrowernumber);
93
@fields = keys %$member unless (@fields);
96
@fields = keys %$member unless (@fields);
94
97
95
- 

Return to bug 9045