Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
I've been struggling with this one for a while on a DB i've been creating.

Basically I agree and disgree with what has been said so far.
Phone numbers are quite complex when you look at all the telecoms in the world. Nothing is standard. For this reason I think I agree with varchar. (mostly to get the breaks right)

Don't store country codes with the numbers. Store the country(prolly full address too) of the number in the DB and have the country code and whatever extra dialing specifics added on the fly based upon where you are.
At least that's the direction I plan of traveling down.

The other question is how big? I'd love to know the answer to that one. The largest number i have seen (with country code I think) was about 17 chars. I wasn't even thinking about extentions at the time (probably better as a separate field). I went with about 20 chars, just to cover everything I could think of. If anyone knows what the longest phone number is (with and without country code) i'd be very interested.


In reply to Re: Question about phone number storage. by bastard
in thread Question about phone number storage. by rfb

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2024-03-28 15:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found