You have the field defined as a signed interger - the maximum value for a signed integer field in mysql is 2147483647, if you try and put anything bigger than this in, it will just set the field to this maximum value.
You have the field defined as a signed interger - the maximum value for a signed integer field in mysql is 2147483647, if you try and put anything bigger than this in, it will just set the field to this maximum value.
put since the number is say 9087060766 and the field is sent to 11 interger it shouldnt overflow it....
put since the number is say 9087060766 and the field is sent to 11 interger it shouldnt overflow it....
That has nothing to do with the length. An unsigned integer is only allocated a given number of bytes by MySQL. You need to use a long or other higher-capacity data type. If you're storing phone numbers or other non-purely-numerical data, use a string.
That has nothing to do with the length. An unsigned integer is only allocated a given number of bytes by MySQL. You need to use a long or other higher-capacity data type. If you're storing phone numbers or other non-purely-numerical data, use a string.
oh ok, so its because of the number size that was messing msysql up. many thanks to all who helped
Do not treat a phone number as a literal number, especially because the format varies by country. Store it as a string, unless your PHP script connects to a phone and calls it. You can always use regular expressions to parse it to whatever form you want later.
For the US, you can store it as nnn-nnn-nnnn, including the dashes.
Do not treat a phone number as a literal number, especially because the format varies by country. Store it as a string, unless your PHP script connects to a phone and calls it. You can always use regular expressions to parse it to whatever form you want later.
For the US, you can store it as nnn-nnn-nnnn, including the dashes.
what type of field in mysql should i use? and ill assume not to use intval() on the entire number?