<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Não sei se existe uma forma melhor. Deve existir.<br>
<br>
$sql="Select * from teste where datahora="2006-12-11 00";<br>
my $ind_dados = 0;<br>
$sth = $dbh->prepare($sql) || die $DBI::errstr;<br>
$sth->execute || die $DBI::errstr;<br>
<br>
while (my $ref = $sth->fetchrow_hashref()) {$ind_dados++;}<br>
if ($ind_dados > 0) {Veio dados do banco !\n;}<br>
<br>
$sth->finish();<br>
<br>
<pre class="moz-signature" cols="72">Ricardo Portilho Proni
Oracle Database 10g Administrator Certified Associate
Microsoft Certified Professional
Nerv Informática Ltda.</pre>
<br>
<br>
Patty Silva escreveu:
<blockquote
cite="mid20061211162641.49348.qmail@web31308.mail.mud.yahoo.com"
type="cite">
<style type="text/css"><!-- DIV {margin:0px;} --></style>
<div
style="font-family: times new roman,new york,times,serif; font-size: 12pt;">
<div>Ola pessoal, como faco para verificar se veio dados do banco ou
nao?<br>
<br>
faco assim:<br>
<br>
$sql="Select * from teste where datahora="2006-12-11 00";<br>
<br>
$sth = $dbh->prepare($sql) || die $DBI::errstr;<br>
$sth->execute || die $DBI::errstr;<br>
$sth->finish();<br>
<br>
<br>
<br>
<br>
Quero verificar se a consulta me retornou resultado ou nao.. <br>
<br>
Alguem pde me ajudar?/<br>
<br>
Obrigada<br>
<br>
:D<br>
</div>
</div>
<br>
<hr size="1"> Yahoo! Search<br>
Música para ver e ouvir: <a
href="http://us.rd.yahoo.com/mail/br/tagline/search/video/*http://br.search.yahoo.com/search/video?p=james+blunt&ei=UTF-8&cv=g&x=wrt&vm=r&fr=intl-mail-br-b">You're
Beautiful, do James Blunt</a>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
Cascavel-pm mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Cascavel-pm@pm.org">Cascavel-pm@pm.org</a>
<a class="moz-txt-link-freetext" href="http://mail.pm.org/mailman/listinfo/cascavel-pm">http://mail.pm.org/mailman/listinfo/cascavel-pm</a></pre>
<pre wrap="">
<hr size="4" width="90%">
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.15.9/573 - Release Date: 12/5/2006 4:07 PM
</pre>
</blockquote>
</body>
</html>