NYCPHP Meetup

NYPHP.org

[nycphp-talk] storing phone numbers in MySQL

Chris Shiflett shiflett at php.net
Wed Mar 10 18:47:01 EST 2004


--- Jeff Siegel <jsiegel1 at optonline.net> wrote:
> I believe that the storing of the phone numbers would fall under the 
> "display agnostic" theory as noted in the PHundamentals article on 
> storing and retrieving data.

Yeah, although there's the theoretical problem of leading zeroes. However,
as long as it's a number in the US, you can be sure that no such number
exists. In fact, I often check for valid area codes in my data filtering
logic.

I'm not as certain about international numbers, but I'm sure you can find
a definitive list. You could also store this data separately, since it's
not really part of the phone number itself.

Chris

=====
Chris Shiflett - http://shiflett.org/

PHP Security - O'Reilly
     Coming mid-2004
HTTP Developer's Handbook - Sams
     http://httphandbook.org/
PHP Community Site
     http://phpcommunity.org/



More information about the talk mailing list