sub create_image
{
        
my $p    = shift;
        my $dbh  = shift;
        my $node =  $p->{'node'};
        my $tabelle = $p->{'tabelle'};
        my $owner = $p->{'besitzer'};
        
        $node =~ /(\d\d\d)/;
        
my $heather = <<GIFHEADER;
Content Type: image/gif


GIFHEADER

my $schrittweite;
my $count;
my $backdraw = 0;
my $start_x = 0;

my $i = 0;
my $stat_im = new GD::Image(400,100);

my $sql = <<SQL;
select  
ROUND((total_blocks-unused_blocks)/total_blocks*100),
         ROUND((((hwm+1)-
last_used_block)/total_blocks)*100)     
from     M_stats_tab_us 
where    M_stats_tab_us.Tabelle = ?
and      m_stats_tab_us.dp_nr   = ?
and      owner = ?
order by datum
SQL

                my $sth = $dbh->prepare( $sql ) || die
"$DBI::errstr";
                
                $sth->execute( $tabelle,$node,$owner ) || die
"$DBI::errstr";


####            
my( $statist,$differ, @statist,@differ );
$sth->bind_columns( \$statist,\$differ);

while( $sth->fetch() ) {
  push (@statist,$statist);
  push (@differ,$differ);
}

$sth->finish();         
                
                
all i want to do is getting the results of the query
(more than one row into  @differ and @statist.
but the arrays are always empty after ->finish

tia,
michael spellbrink              

__________________________________________________________________

Gesendet von Yahoo! Mail - http://mail.yahoo.de
Sie brauchen mehr Speicher f�r Ihre E-Mails? - http://premiummail.yahoo.de

Reply via email to