http://www.perlmonks.org?node_id=200277

Hammy has asked for the wisdom of the Perl Monks concerning the following question:

I continually get the following error when running the code below. It still runs the code and returns me the results, but it gives an error. Any ideas? It does not matter what query I run - even simple queries give the error. One more thing, it give the error on the fetchrow. Thanks

flexreportmap.cgi: DBD::mysql::st fetchrow_arrayref failed: fetch() wi +thout execute() at library.pl line 311, <HTML> line 193. $sth = $dbh->prepare($sql); unless ($sth->execute) { fatal ("SQL query failed: " . $sth->errstr . "\n$sql"); } $ref = $sth->fetchrow_arrayref(); $sth->finish; return $ref;