Finally I solved my problem, and works fine for me, with the following corrected code:
my $db = $DB->table ('Category');
my $sth = $db->select ( ['Full_Name'] );
my ($cat, $row, $name);
while ( $row = $sth->fetchrow_hashref ) {
$name = $row->{Full_Name};
$cat .= "<a href=$name>$name</a><br>";
}
return $cat;
}
mgeyman: as you see the real difference is using:
instead:
This second one is wrong, it can be only used for arrays.
I hope it helps solving your problem, too.
Best regards,
Webmaster33
Paid Support from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Code:
sub { my $db = $DB->table ('Category');
my $sth = $db->select ( ['Full_Name'] );
my ($cat, $row, $name);
while ( $row = $sth->fetchrow_hashref ) {
$name = $row->{Full_Name};
$cat .= "<a href=$name>$name</a><br>";
}
return $cat;
}
mgeyman: as you see the real difference is using:
Code:
while ( $row = $sth->fetchrow_hashref ) {Code:
while (my ($row) = $sth->fetchrow_hashref) {I hope it helps solving your problem, too.
Best regards,
Webmaster33
Paid Support from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...