Ola Pessoal..<br>fiz um programa na seguinte estrutura:<br><br><br>$sql=qq{SELECT * from teste where datahora>=timestamp '2007-08-01 00:00:00' - interval '6 hour' order by datahora};<br> <br>$sth = $dbh->prepare($sql) || die $DBI::errstr;<br>$sth->execute || die $DBI::errstr;<br> <br><br>while(@row = $sth->fetchrow_array()) <br>{ <br><br>$sql="UPDATE tabela1 set teste='33333' where id='$row[1]' and datahora='$row[2]'";<br> $sth = $dbh->prepare($sql) || die $DBI::errstr;<br>$sth->execute || die $DBI::errstr;<br> warn "Problema ao processar os resultados", $sth->errstr( ), "\n" if $sth->err( );<br>$sth->finish();<br><br>}<br> }<br> <br> warn "Problema ao processar os resultados", $sth->errstr( ), "\n" if $sth->err(
);<br>$sth->finish();<br><br><br><br>Eu faco dois execute, minha duvida é.. eu posso colocar os dois como $sth.. pois se eu coloco os dois como $sth da esse erro:<br><br>DBD::Pg::st fetchrow_array failed: no statement executing<br>Problema ao processar os resultadosno statement executing<br><br>Se eu coloco $sth2 nao da erro nenhum..<br><br>Alguem pode me explicar??<br><br>Obrigada<br><br><br><br><br><br><p> 
Alertas do Yahoo! Mail em seu celular. <a href="http://br.mobile.yahoo.com/mailalertas/">Saiba mais</a>.