If no separator is specifield, a comma will be used.
-H, --show-header Print field names on first row
-w, --where=CONDITION Condition to filter borrowers to export
- (SQL where clause)
+ (SQL where clause).
+ CONDITION must be enclosed by double quotes and
+ if needed, where value by single quotes.
+ example : --where "surname='De Lattre'"
-h, --help Show this help
USAGE
# If the user did not specify any field to export, we assume he wants them all
# We retrieve the first borrower informations to get field names
-my ($borrowernumber) = $sth->fetchrow_array;
+my ($borrowernumber) = $sth->fetchrow_array or die "No borrower to export";
my $member = GetMemberDetails($borrowernumber);
@fields = keys %$member unless (@fields);