in reply to Building an SQL query

The 'best' way would be to have two tables, a 'user' table and an 'address' table, with a common column ('username' or perhaps a 'user_id' field), then your problem would be simple. Then you could easily insert, delete, and update addresses, and there would be no limit on the number of addresses you could store.

That being said, with the way you describe the table, you'd need to select the 'addresses' of a user, split them up, add, delete, or update the appropriate one, paste the addresses back together, then update the user record. Sounds like a pain to me, but its what you'd have to do.

Update: A simple split/join procedure:
# Add/Update or delete an address my %hsh; my @arr=split /\s*,\s*/, $addresses; @hsh{@arr}=@arr; # Add/Update an address $hsh{'Joe Schmoe joe@schmoe.com'}='Joseph Schmoe joseph@schmoe.com'; # Delete an address delete $hsh{JoeBob Schmoe joebob@scmoe.com}; $addresses = join ", ", values %hsh;