return \@results;
}
-=head2 GetAttributes
-
- my $attributes = C4::Members::Attributes::GetAttributes([$opac_only]);
-
-Retrieve an arrayref of extended attribute codes
-
-=cut
-
-sub GetAttributes {
- my ($opac_only) = @_;
-
- my $dbh = C4::Context->dbh();
- my $query = "SELECT code FROM borrower_attribute_types";
- $query .= "\nWHERE opac_display = 1" if $opac_only;
- $query .= "\nORDER BY code";
- return $dbh->selectcol_arrayref($query);
-}
-
=head2 GetBorrowerAttributeValue
my $value = C4::Members::Attributes::GetBorrowerAttributeValue($borrowernumber, $attribute_code);
$query .= $branch_limit
? q{
LEFT JOIN borrower_attribute_types_branches ON bat_code = code
- WHERE b_branchcode = ? OR b_branchcode IS NULL
+ WHERE ( b_branchcode = ? OR b_branchcode IS NULL )
AND borrowernumber = ?
}
: q{
Delete a borrower attribute for the patron identified by C<$borrowernumber> and the attribute code of C<$attribute>
=cut
+
sub DeleteBorrowerAttribute {
my ( $borrowernumber, $attribute ) = @_;
Update a borrower attribute C<$attribute> for the patron identified by C<$borrowernumber>,
=cut
+
sub UpdateBorrowerAttribute {
my ( $borrowernumber, $attribute ) = @_;