in reply to DBI SQL Query Question
I don't see any problems with your code, but you could make it a bit more efficient with fetchrow_hashref().
$UniqueDay = "SELECT count(*) as COUNT, max(time) as MAX, min(time) as + MIN, attacksignature from np_data where month=? and day=? group by a +ttacksignature as ATTACKSIG order by COUNT desc"; ##Unique Events $unique_events_sth = $db->prepare( $UniqueDay ); $unique_events_sth->execute($Month, $Day); while ( my $unique = $unique_events_sth->fetchrow_hashref ) { push( @unique_array, $unique ); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: DBI SQL Query Question
by runrig (Abbot) on Jan 11, 2002 at 23:00 UTC | |
by ehdonhon (Curate) on Jan 11, 2002 at 23:35 UTC |