DBIx::Chart and Zero values
From: Kenneth *** (kend3000_at_yahoo.ca)
Date: 03/16/04
- Next message: Neale Hirsh: ""make" not working for Oracle driver"
- Previous message: Hendra Kusnandar: "Re: insert into mysql with pattern matching"
- Next in thread: Kenneth ***: "RE: DBIx::Chart and Zero values"
- Maybe reply: Kenneth ***: "RE: DBIx::Chart and Zero values"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 16 Mar 2004 00:45:42 -0500 (EST) To: dbi-users@perl.org
I'm having a problem using DBIx::Chart when my table
contains zeros. I am charting a table that contains a
date and 3 integers. A chart is generated OK as long
as none of the integer columns contain a zero. If any
integer has the value of zero, I don't see any error
messages but an empty image is returned.
I'm using Activestate 5.6 with DBI v1.34, DBIx::Chart
v.01, DBD::Chart v.80
Here is my script:
###########################################
use DBIx::Chart;
$dbh = DBIx::Chart->connect('dbi:DB2:mydb', "", "",
{ PrintError => 0, RaiseError => 1 } );
$sth = $dbh->prepare("
select xdate, lreads, preads, txns from testline
returning linegraph(*)
WHERE
WIDTH=600 AND HEIGHT=400 AND
KEEPORIGIN=1 and SHOWGRID=1 and linewidth=2 and
gridcolor='lgray' and x_orient='VERTICAL' and
Y_LOG=1 and
x_axis = ' ' and y_axis = 'GB' and
TITLE = 'Tablespace Growth (in GB)'
");
$sth->execute;
$img = $sth->fetchrow_arrayref;
open(OUTF, '>test.png');
binmode OUTF;
print OUTF $$img[0];
close OUTF;
$dbh->disconnect;
###########################################
______________________________________________________________________
Post your free ad now! http://personals.yahoo.ca
- Next message: Neale Hirsh: ""make" not working for Oracle driver"
- Previous message: Hendra Kusnandar: "Re: insert into mysql with pattern matching"
- Next in thread: Kenneth ***: "RE: DBIx::Chart and Zero values"
- Maybe reply: Kenneth ***: "RE: DBIx::Chart and Zero values"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]