diff options
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/RHRD/rddb.pm | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/RHRD/rddb.pm b/lib/RHRD/rddb.pm index 67b431f..3a6bf21 100755 --- a/lib/RHRD/rddb.pm +++ b/lib/RHRD/rddb.pm @@ -952,6 +952,27 @@ sub list_shows return @show_dbs; } +sub list_showids +{ + my ($ctx, $groupname) = @_; + + my $sql = qq{select NUMBER from CART where GROUP_NAME = ? order by NUMBER}; + + my $sth = $ctx->{'dbh'}->prepare($sql) + or return (undef, 'ERROR', "Database Error: " . $ctx->{'dbh'}->errstr); + + $sth->execute($ctx->{'config'}{'specialgroups'}{'shows'}) + or return (undef, 'ERROR', "Database Error: " . $sth->errstr); + + my @showids; + while(my ($showid) = $sth->fetchrow_array()) { + push @showids, $showid; + } + $sth->finish(); + + return @showids; +} + sub create_show_group { my ($ctx, $groupname) = @_; |