Lines 47-70
Review.pm provides many routines for manipulating reviews.
Link Here
|
47 |
|
47 |
|
48 |
=head1 FUNCTIONS |
48 |
=head1 FUNCTIONS |
49 |
|
49 |
|
50 |
=head2 savereview |
|
|
51 |
|
52 |
savereview($biblionumber,$borrowernumber, $review); |
53 |
|
54 |
Save a review in the 'reviews' database |
55 |
|
56 |
=cut |
57 |
|
58 |
sub savereview { |
59 |
my ( $biblionumber, $borrowernumber, $review ) = @_; |
60 |
my $dbh = C4::Context->dbh; |
61 |
my $query = "INSERT INTO reviews (borrowernumber,biblionumber, |
62 |
review,approved,datereviewed) VALUES |
63 |
(?,?,?,0,now())"; |
64 |
my $sth = $dbh->prepare($query); |
65 |
$sth->execute( $borrowernumber, $biblionumber, $review ); |
66 |
} |
67 |
|
68 |
=head2 numberofreviewsbybiblionumber |
50 |
=head2 numberofreviewsbybiblionumber |
69 |
|
51 |
|
70 |
my $count=numberofreviewsbybiblionumber($biblionumber); |
52 |
my $count=numberofreviewsbybiblionumber($biblionumber); |