On Mon, Jul 13, 2009 at 4:18 PM, Haig Dedeyan<hdedeyan@xxxxxxxxxxxx> wrote: > for the phone #'s, I'm using int as the data type & storing each part of the > phone # in its own cell, > > When it gets displayed, I add a dash in between each part of the phone #'s > (country code-area code-1st set of digits-last set of digits) > > Cheers > > Haig I disagree. Telephone numbers are not actually numbers; they are sequences of numeric digits. Unlike IP addresses where 10.0.0.1 is equivalent to 010.000.000.001, leading zeros are significant; they are part of the data, not just padding to be inserted automatically by the database or by a formatting function in the presentation layer. When you validate an area code in the North American numbering plan, do you validate that it is a number between 1 and 999 or do you validate that it is a string of exactly 3 decimal-digit characters long? Expand that to international phone numbers, and the zeros become even more significant since you can't easily make assumptions about the length of various segments in a phone number. Sorry, but I just don't see any advantage to storing them as integers. Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php