Lines 48-54
BEGIN {
Link Here
|
48 |
&mybranch |
48 |
&mybranch |
49 |
&GetBranchesCount |
49 |
&GetBranchesCount |
50 |
); |
50 |
); |
51 |
@EXPORT_OK = qw( &onlymine &mybranch get_branch_code_from_name ); |
51 |
@EXPORT_OK = qw( &onlymine &mybranch ); |
52 |
} |
52 |
} |
53 |
|
53 |
|
54 |
=head1 NAME |
54 |
=head1 NAME |
Lines 589-603
sub CheckBranchCategorycode {
Link Here
|
589 |
return $total; |
589 |
return $total; |
590 |
} |
590 |
} |
591 |
|
591 |
|
592 |
sub get_branch_code_from_name { |
|
|
593 |
my @branch_name = @_; |
594 |
my $query = "SELECT branchcode FROM branches WHERE branchname=?;"; |
595 |
my $dbh = C4::Context->dbh(); |
596 |
my $sth = $dbh->prepare($query); |
597 |
$sth->execute(@branch_name); |
598 |
return $sth->fetchrow_array; |
599 |
} |
600 |
|
601 |
sub GetBranchesCount { |
592 |
sub GetBranchesCount { |
602 |
my $dbh = C4::Context->dbh(); |
593 |
my $dbh = C4::Context->dbh(); |
603 |
my $query = "SELECT COUNT(*) AS branches_count FROM branches"; |
594 |
my $query = "SELECT COUNT(*) AS branches_count FROM branches"; |