At 4:59 -0700 10/2/04, Stuart Felenstein 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)

Are you trying to store telephone number values with the intermediate dashes? Such values are not actually numbers. You'll need to store them as strings, or else remove the dashes.


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


--
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to