Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Re: [ArtistikDD] Global select?

Quote Reply
Re: [ArtistikDD] Global select? In reply to
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.
Subject Author Views Date
Thread Global select? ArtistikDD 2696 Feb 2, 2005, 1:17 PM
Thread Re: [ArtistikDD] Global select?
jai 2625 Feb 2, 2005, 4:14 PM
Post Re: [jai] Global select?
ArtistikDD 2616 Feb 2, 2005, 7:48 PM