Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
This needs to be done in Perl not in the database select (I have no control over the select statement that is issued)$sth=$dbh->prepare("select data from mytable"); $sth->execute; while ($data = $sth->fetchrow_arrayref()) { if $data->[0],$data->[1],$data->[2] is the same as the equivalent elem +ents from previous record then print $data->[4] otherwise print complete $data record } $sth->finish; $dbh->disconnect;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: compare current row with previous row
by davidrw (Prior) on Jan 16, 2006 at 14:42 UTC | |
by Anonymous Monk on Jan 16, 2006 at 15:06 UTC | |
|
Re: compare current row with previous row
by holli (Abbot) on Jan 16, 2006 at 14:50 UTC | |
|
Re: compare current row with previous row
by blazar (Canon) on Jan 16, 2006 at 15:11 UTC |