This should do the trick -
sub {
my $tags = shift;
my $table = $DB->table('HFSHC_members');
my $sth = $table->select({'Status' => 'Registered' }, ['Username']);
my $output = '<select name=billTO><option value="">--</option>';
while (my $row = $sth->fetchrow_hashref) {
$output .= '<option value='.$row->{Username}.'>'.$row->{Username}.'</option>';
}
$output .= '</select>';
return $output;
}
Take a look at the DBManSQL Help pages in your Admin.
GT Module Documentation - Table - "select"
You can build more complex select statements using "select_options".
Hope that helps.
Simon.
sub {
my $tags = shift;
my $table = $DB->table('HFSHC_members');
my $sth = $table->select({'Status' => 'Registered' }, ['Username']);
my $output = '<select name=billTO><option value="">--</option>';
while (my $row = $sth->fetchrow_hashref) {
$output .= '<option value='.$row->{Username}.'>'.$row->{Username}.'</option>';
}
$output .= '</select>';
return $output;
}
Take a look at the DBManSQL Help pages in your Admin.
GT Module Documentation - Table - "select"
You can build more complex select statements using "select_options".
Hope that helps.
Simon.