Lines 552-592
sub GetMemberIssuesAndFines {
Link Here
|
552 |
} |
552 |
} |
553 |
|
553 |
|
554 |
|
554 |
|
555 |
=head2 columns |
|
|
556 |
|
557 |
my @columns = C4::Member::columns(); |
558 |
|
559 |
Returns an array of borrowers' table columns on success, |
560 |
and an empty array on failure. |
561 |
|
562 |
=cut |
563 |
|
564 |
sub columns { |
565 |
|
566 |
# Pure ANSI SQL goodness. |
567 |
my $sql = 'SELECT * FROM borrowers WHERE 1=0;'; |
568 |
|
569 |
# Get the database handle. |
570 |
my $dbh = C4::Context->dbh; |
571 |
|
572 |
# Run the SQL statement to load STH's readonly properties. |
573 |
my $sth = $dbh->prepare($sql); |
574 |
my $rv = $sth->execute(); |
575 |
|
576 |
# This only fails if the table doesn't exist. |
577 |
# This will always be called AFTER an install or upgrade, |
578 |
# so borrowers will exist! |
579 |
my @data; |
580 |
if ($sth->{NUM_OF_FIELDS}>0) { |
581 |
@data = @{$sth->{NAME}}; |
582 |
} |
583 |
else { |
584 |
@data = (); |
585 |
} |
586 |
return @data; |
587 |
} |
588 |
|
589 |
|
590 |
=head2 ModMember |
555 |
=head2 ModMember |
591 |
|
556 |
|
592 |
my $success = ModMember(borrowernumber => $borrowernumber, |
557 |
my $success = ModMember(borrowernumber => $borrowernumber, |