Hi. Can anyone see anything wrong with this global? I have the following;
my $table = $DB->table('Links');
my $sth = $table->select( ['DISTINCT(State)'] ) || return $GT::SQL::error;
my $back;
while (my $hit = $sth->fetchrow_hashref) {
$back .= qq|<option>$hit->{State}</option>|;
}
}
It doesn't return anything, BUT it doesn't give an error :-/
I'm trying to get a list of States from within the database (I think the DISTINCT is working ok).
Any ideas are much appreciated...I've been racking my brain on this one for quite a while :(
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Code:
sub { my $table = $DB->table('Links');
my $sth = $table->select( ['DISTINCT(State)'] ) || return $GT::SQL::error;
my $back;
while (my $hit = $sth->fetchrow_hashref) {
$back .= qq|<option>$hit->{State}</option>|;
}
}
It doesn't return anything, BUT it doesn't give an error :-/
I'm trying to get a list of States from within the database (I think the DISTINCT is working ok).
Any ideas are much appreciated...I've been racking my brain on this one for quite a while :(
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!