<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>Se seu&nbsp;SGDB suportar, RTFM "GROUP BY".<BR>
Do contrário, tente usar hashes ao invés de arrays.<BR>
<BR><SPAN class=EC_EC_203180417-25102007></SPAN>[]'s<BR>
Alceu<BR>
<BLOCKQUOTE>
<HR id=EC_stopSpelling>
Date: Mon, 19 Nov 2007 01:51:15 -0800<BR>From: ptfzs@yahoo.com.br<BR>To: cascavel-pm@pm.org<BR>Subject: [Cascavel-pm] Agrupar ID<BR><BR>
<META content="Microsoft SafeHTML" name=Generator>
<STYLE>
.ExternalClass DIV
{;}

</STYLE>

<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">
<DIV>Pessoal. faco uma busca no BD e gostaria que de agrupar os dados do msm id:<BR><BR>ex:<BR><BR>my $sql = "SELECT id,datahora,value,flag from table where datahora&gt;=timestamp '2007-11-12 05:00:00' - interval '24 hours' order by datahora";<BR>$sth = $dbh-&gt;prepare($sql) || die $DBI::errstr;<BR>$sth-&gt;execute || die $DBI::errstr;<BR># return the results<BR>while ( my @row = $sth-&gt;fetchrow_array( ) )<BR>{ <BR><BR><BR>.<BR>..<BR>.<BR>Gostaria de agrupar os IDs... colocar em uma array .. <BR>Alguem pode me ajudar??<BR>:D<BR><BR>Thnaks..<BR></DIV></DIV></BLOCKQUOTE><br /><hr />Discover the new Windows Vista <a href='http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE' target='_new'>Learn more!</a></body>
</html>