Lines 220-228
sub GetRecentShelves {
Link Here
|
220 |
|
220 |
|
221 |
=head2 GetAllShelves |
221 |
=head2 GetAllShelves |
222 |
|
222 |
|
223 |
($shelflist) = GetAllShelves($owner) |
223 |
$shelflist = GetAllShelves($owner) |
224 |
|
224 |
|
225 |
This function returns a references to an array of hashrefs containing all shelves sorted |
225 |
This function returns a reference to an array of hashrefs containing all shelves sorted |
226 |
by the shelf name. |
226 |
by the shelf name. |
227 |
|
227 |
|
228 |
This function is intended to return a dataset reflecting all the shelves for |
228 |
This function is intended to return a dataset reflecting all the shelves for |
Lines 230-244
the submitted parameters.
Link Here
|
230 |
|
230 |
|
231 |
=cut |
231 |
=cut |
232 |
|
232 |
|
233 |
sub GetAllShelves ($$) { |
233 |
sub GetAllShelves { |
234 |
my ($category,$owner) = @_; |
234 |
my ($category,$owner) = @_; |
235 |
my (@shelflist); |
235 |
my $query = 'SELECT * FROM virtualshelves WHERE category = ? AND owner = ? ORDER BY shelfname ASC'; |
236 |
my @params = ($category,$owner); |
236 |
my $sth = $dbh->prepare( $query ); |
237 |
my $query = "SELECT * FROM virtualshelves WHERE category = ? AND owner = ? ORDER BY shelfname ASC"; |
237 |
$sth->execute( $category, $owner ); |
238 |
my $sth = $dbh->prepare($query); |
238 |
return $sth->fetchall_arrayref({}); |
239 |
$sth->execute(@params); |
|
|
240 |
@shelflist = $sth->fetchall_arrayref({}); |
241 |
return ( \@shelflist ); |
242 |
} |
239 |
} |
243 |
|
240 |
|
244 |
=head2 GetShelf |
241 |
=head2 GetShelf |