in reply to Displaying Images using Perl
The following lines kinda jumped out at me, from about the middle of the first batch of code:
# we're fetching a single value (name), so we can call fetchrow_ar +ray() # in a scalar context to get the value while (my $item_id = $sth->fetchrow_array ())
Try changing the third line of that to:
while (my ($item_id) = $sth->fetchrow_array ())
I'm not sure if DBI's fetchrow_array() uses wantarray or not, but it looks like $item_id is getting set to scalar $sth->fetchrow_array (), which is not what you want.
So change that line, and let me know if it worked.
Update: Just saw poj's post. s?he's right. Ignore my suggestion.
|
|---|