in reply to Re: Building a notification system based on MySQL
in thread Building a notification system based on MySQL

Thanks for the tip! Here's the new code to handle a situation when the key already exists

while (my($slot,$value) = $filterSth->fetchrow_array()) { if ($filerHash{$slot}) { //slot already exists, just append to it my $existingValue = $filterHash{$slot}; my $newValue = $existingValue . " | " . $value; $filterHash{$slot} = $newValue; } else { //slot does not exist, just add it $filterHash{$slot} = $value; } }