My code looks like this:
use DBI;
$sth = $dbh->prepare("SELECT Date,Time,Metal_Code,Metal_Desc,Weight,Price FROM History
WHERE Date = $RDate
ORDER by Date, Time, Metal_Code");
print "\nDetail Report for $MonthName[$mon] $day, $yr\n";
$sth->execute();
while (my (@data) = $sth->fetch_array()) {
When I run it, I get this error:
H:\>Report-History.pl
R1=1 R2=0 R3=0 R4=0 R5=0 R6=0 R7=0
RDate=2010/02/09 RMonth=2 RYear=2010
Report 1 - Detail for Day
Detail Report for February 09, 2010
Can't locate object method "fetch_array" via package "DBI::st" at H:\Report-History.pl line 119.
Do I need to include another module to get this to work? What am I missing?