Bugzilla – Attachment 16249 Details for
Bug 9045
Adding some parameters to export_borrowers.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9045 followup : Adding test if results has some records and usage example for --where clause
Bug-9045-followup--Adding-test-if-results-has-some.patch (text/plain), 1.56 KB, created by
Sophie MEYNIEUX
on 2013-03-18 14:32:09 UTC
(
hide
)
Description:
Bug 9045 followup : Adding test if results has some records and usage example for --where clause
Filename:
MIME Type:
Creator:
Sophie MEYNIEUX
Created:
2013-03-18 14:32:09 UTC
Size:
1.56 KB
patch
obsolete
>From 4788621103d8bfdce752aa61e8d0ec540e1fda3b Mon Sep 17 00:00:00 2001 >From: Sophie Meynieux <sophie.meynieux@biblibre.com> >Date: Mon, 18 Mar 2013 15:29:42 +0100 >Subject: [PATCH] Bug 9045 followup : Adding test if results has some records > and usage example for --where clause > >--- > misc/export_borrowers.pl | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > >diff --git a/misc/export_borrowers.pl b/misc/export_borrowers.pl >index e4fa7b0..b1552ea 100755 >--- a/misc/export_borrowers.pl >+++ b/misc/export_borrowers.pl >@@ -50,7 +50,10 @@ $0 -h > 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 >@@ -88,7 +91,7 @@ my $csv = Text::CSV->new( { sep_char => $separator, binary => 1 } ); > > # 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); > >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 9045
:
13362
|
13363
|
13923
|
16249
|
16440
|
16578
|
16579