use GD::Graph::Data; use GD::Graph::bars; my $data = GD::Graph::Data->new(); my $sth = $dbh->prepare("SELECT time, mastuntemp, LineTemp, spargtemp FROM brew_temp_tb WHERE sitename = 'Brew' AND batchnumber = '$batchnumber' ORDER BY time";"); if (!$sth->execute()) { die "Error: ". $sth->errstr ."\n"; } my @row; while (@row = $sth->fetchrow_array) { $data->add_point(@row); }