From: | Andrew Gould <andrewgould(at)yahoo(dot)com> |
---|---|
To: | Raise Exception <raiseexception(at)yahoo(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Best way to store/search phone numbers? |
Date: | 2001-11-01 19:53:45 |
Message-ID: | 20011101195345.87937.qmail@web13406.mail.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
My 2 cents: Concatenating data is easier than
extracting data from a larger element.
I'd use different fields (country code, area code,
phone number, extension, etc.) and instruct the users
not to use punctuation. The data will (hopefully) be
a little cleaner; and easier to use. Then, if you
want it all in one field, use an update query to
concatenate the values with formatting characters into
a separate field for easy reporting/printing.
Best of luck,
Andrew
--- Raise Exception <raiseexception(at)yahoo(dot)com> wrote:
> I am doing a standard company info database, with
> phone numbers, and I
> was wondering if there was a general concensus about
> the best way to
> store phone numbers. My problem is multiple users
> will be entering in
> data via a web browser (PHP backend), and the
> formatting may not be
> the same in all cases. I'm not sure if I should
> store some sort of
> standard formatting in a plain text field (e.g.,
> "(555) 555-5555") or
> strip out all the punctuation characters. There is
> also the option of
> storing the parts in different columns, but that
> seems a bit overkill
> (but would make searching possibly faster).
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 2: you can get off all lists at once with the
> unregister command
> (send "unregister YourEmailAddressHere" to
majordomo(at)postgresql(dot)org)
__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com
From | Date | Subject | |
---|---|---|---|
Next Message | Al Kirkus | 2001-11-01 20:24:29 | Probably simple answer |
Previous Message | Bruce Momjian | 2001-11-01 18:49:00 | Sorry for blocking email |