One issue could be that an int column unsigned can only hold up to 4294967295 a ten digit number. Plus if you put it in a context of a phone number... only area codes 428 or lower will have ALL THE EXCHANGES and ALL THE UNIQUE NUMBERS in the range... with part of area code 429
A bigint will hold the complete range you are looking for.... However, I would sugest that since you mostlikely are not going to be doing mathematical operations on a phone number that you use a varchar or char field. Maybe someone could correct me but aren't regex for strings only? Gary On Sat, 2 Oct 2004 04:59:45 -0700 (PDT), Stuart Felenstein <[EMAIL PROTECTED]> wrote: > I have a field "telephone". > Set to type :int: > Length: 11 > It's not working correctly, and not sure if it's my > application or something I have wrongly set up for the > database. > We are talking about U.S. Telephone numbers here, so 7 > digits (area code, exchange, unique number) > > Now it seems everything works up to the storing of 6 > numbers. Once I add the 7th number, everything goes > haywire. The number gets transformed to some totally > different number and / or 0 (zero). > > Now I had set up a validation , which I think would be > correct for a U.S. number: > > [0-9\+\-\/ \(\)\.]+ > > Yet, even if I remove that regexp and let it validate > solely on integers: -{0,1}\d+ > > Nothing. > I thought perhaps enforcing the field to unsigned > might help, but no change. > > One last note, I've "now" added some javascript to > enforce format. This hasn't changed anything , better > or worse. Same behaviour. This is solely for making > sure client enters 111-111-1111 format. Just wanted > to include this in my information. > > Well if anyone has a clue appreicate the help. > > Stuart > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]