Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Array instead $link->{fieldname}

Quote Reply
Array instead $link->{fieldname}
Hy all, i try to read some data with

sub {
my $tags = shift;
my $lid = $tags->{ID};
my $output;
my ( $db, $sth, $link, $cond);
$db = $DB->table ('PoInfo');
$db->select_options('LIMIT 1');
$sth = $db->select ({LinkID => $lid });

while ($link = $sth->fetchrow_hashref) {
return $output;

My Problem now is to read the data from the table inside an array to use later a for next loop.
Now i could get it with

my $lala = $link->{fieldname};

but cause i have a lot of fields, i wont do:

$a[0] = $link->{fieldname_0};
$a[1] = $link->{fieldname_1};
$a[n] = $link->{fieldname_n};

There must be a way to get it on antoher way, isnīt it?

Better than this would be something like:

get all field_names from table where value = 1
as i could do it with php.

Some ideas?
Subject Author Views Date
Thread Array instead $link->{fieldname} Robert 1149 Jan 31, 2003, 11:11 PM
Post Re: [Robert] Array instead $link->{fieldname}
Robert 1107 Jan 31, 2003, 11:52 PM