1 <SELECT NAME="<% $opt{'field'} || 'serviceid' %>">
3 % unless ( $opt{'multiple'} || $opt{'disable_empty'} ) {
4 <OPTION VALUE="">Select serviceid</OPTION>
7 % foreach my $serviceid ( keys %serviceid ) {
8 <OPTION VALUE="<%$serviceid%>"><% $serviceid %></OPTION>
17 #is this going to get too slow or will the index make it okay?
18 my $sth = dbh->prepare("SELECT DISTINCT(serviceid) FROM srvexport")
20 $sth->execute or die $sth->errstr;
22 while ( my $row = $sth->fetchrow_arrayref ) {
23 my $serviceid = $row->[0];
24 $serviceid =~ s/_(IN|OUT)$//;
25 $serviceid{$serviceid}=1;