rose has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: (OT) Mysql insert Problem
by cwry (Monk) on Jul 10, 2006 at 06:16 UTC

    From your create table, the "phone" field has a type of int, meaning the maximum value storable is 2147483647.

    I suggest you use varchar instead, since a phone number will often contain non-digits to indicate things such as a country code (for example "+61294131491" for an Australian number) or a separate extension.

      Or if you're keeping it numerical, use BIGINT instead of INT. If ever you index the field, that will speed up selects a little...
Re: (OT) Mysql insert Problem
by McDarren (Abbot) on Jul 10, 2006 at 06:18 UTC
    From the MySQL docs..
    INT[(M)] [UNSIGNED] [ZEROFILL] A normal-size integer. The signed range is -2147483648 to 2147483647. +The unsigned range is 0 to 4294967295.

    You are trying to insert a value which is outside the allowable range for an INT type, and so you get the maximum value of 2147483647.

    You probably want to use a varchar type instead.

    Cheers,
    Darren :)

    PS. Yes, this IS off-topic.