[San-Diego-pm] Stuck again

Joel Fentin joel at fentin.com
Mon Dec 19 10:29:47 PST 2016


I'm trying to modify Perl code I wrote years ago. First I have to get it 
running as is. It won't.

---------------

my $ref=$dbh->selectall_arrayref("SELECT * FROM titulo LIMIT 10");

There is no error and no data.

This works on a website on BlueHost.
It also works on a personal server in an old computer using old windows, 
old Perl, old Apache, & old MySQL.

---------------

So then, I tried something newer:

$sth = $dbh->prepare("SELECT * FROM titulo LIMIT 10");
$sth->execute()||($error="Error:$DBI::errstr\n");
$ref=$dbh->fetchall_arrayref();
The error: Can't locate object method "fetchall_arrayref" via package 
"DBI::db" at C:/Apache2.2/cgi-bin/PacoWeb/CDsearch.pl line 285

(There is a use DBI; statement at the start of the program.)

Any help/ideas/wisdom/suggestions appreciated.

-- 
Joel Fentin       tel: 760-749-8863
Personal Website: http://fentin.com


More information about the San-Diego-pm mailing list