> > 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
> 
> # You might want to add more to the die() messages.
> # Usually you can tell what happened from the text
> of
> # $DBI::errstr, but not always.
> 
> >                 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);
> 
> my $rowcount = 0;
> 
> > while( $sth->fetch() ) {
> 
> ++$rowcount;
> 
> >   push (@statist,$statist);
> >   push (@differ,$differ);
> > }
> 
> die "Error during fetch, $DBI::errstr\n" if
> $DBI::err;
> print "Fetched $rowcount rows\n";
> 
> # $sth->finish is deprecated when all rows are being
> fetched
> 
> > $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
> 
> The biggest problme I see is that you are not doing
> any error checking
> after the loop.  It appears that no rows are being
> fetched, but without
> error checking or at least a counter in the loop,
> you have no idea what is
> going on.  I've inserted some suggested statements
> above.
> 


thanks, all.i could not print out any values because
its a gif in a cgi script, and any script-output
before the header (content type:image/gif)!! would
result into my browser printing tons of funky
characters (bin mode!). there were rows in the query,
as i (and toad)
proved, but the problem is solved.
but there is another would like to know.
i dont know if its an oracle - specific problem, but
is there a way to use a bind variable for a dblink?


for example, i would like to select anything from
[EMAIL PROTECTED], after reading the manual i found its
impossible!
(select xy from ? where ...) does not work. what can i
do? 
my questions are stupid, i know; but im trying to
learn 
something, and my oreilly dbi cant help me
sometimes...

regards, michael spellbrink (lame)



__________________________________________________________________

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