summaryrefslogtreecommitdiff
path: root/lib/RHRD
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2015-10-09 19:30:04 (GMT)
committerChristian Pointner <equinox@spreadspace.org>2015-10-09 19:30:04 (GMT)
commit439d98c65289f19662459106de1cc1a40ee2c5f4 (patch)
tree0be11057f77c0252afbf8204d6178bac8b266e3e /lib/RHRD
parentc253bf234deafa69ed2e462c8ec2d8f41b484e9e (diff)
first checks for showids
Diffstat (limited to 'lib/RHRD')
-rwxr-xr-xlib/RHRD/rddb.pm21
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) = @_;