jerrygarciuh has asked for the wisdom of the Perl Monks concerning the following question:
_____________________________________________________sub month_events { $sth = $dbh->prepare("SELECT * FROM hno_calendar WHERE year = $yea +r AND month = $month"); $sth->execute(); while (my $ref = $sth->fetchrow_hashref()) { if ( !exists $events{ $ref->{day} } ) { $events{ $ref->{day} } = $ref->{title}; } else { $events{ $ref->{$day} } .=$ref->{title}; } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Concatenating Identical Key's Values
by Kanji (Parson) on Apr 04, 2002 at 04:39 UTC | |
by jerrygarciuh (Curate) on Apr 04, 2002 at 04:42 UTC | |
by mla (Beadle) on Apr 04, 2002 at 06:42 UTC | |
by jerrygarciuh (Curate) on Apr 04, 2002 at 14:57 UTC | |
by kappa (Chaplain) on Apr 04, 2002 at 12:43 UTC |