Sorry - typing error - that is what I used.
I've cut out all the extra code and this is what I have:
my @listlink = (5000,5001,5002);
foreach my $link (@listlink){
print "LinkID = $link\n";
my $rec = $DB->table('Links')->get($link);
}
And this is the output:
LinkID = 5000
LinkID = 5001
Content-type: text/html
Can't call method "prepare" without a package or object reference at /path to admin/GT/SQL/Driver/MYSQL.pm line 36.
So it works fine for the first one - just can't do any more than that.
I've cut out all the extra code and this is what I have:
my @listlink = (5000,5001,5002);
foreach my $link (@listlink){
print "LinkID = $link\n";
my $rec = $DB->table('Links')->get($link);
}
And this is the output:
LinkID = 5000
LinkID = 5001
Content-type: text/html
Can't call method "prepare" without a package or object reference at /path to admin/GT/SQL/Driver/MYSQL.pm line 36.
So it works fine for the first one - just can't do any more than that.