输入类型文本字段给出固定错误2147483647 [英] input type text field giving fixed error 2147483647

查看:45
本文介绍了输入类型文本字段给出固定错误2147483647的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将输入类型字段设置为移动类型,但是每次输入该特定值时都会在我的数据库中,即 2147483647 ,无论我们填写什么值

I have input type field as mobile but every time it feeds in this particular value in my database ie 2147483647 irrespective whatever values we fill

td><span class="style5">Mobile</span></td>
  <td><input type="number" name="mob" class="text-input" maxlength="10" /></td>

连接代码$Mobile= mysql_real_escape_string( $_POST['mob']);

"INSERT INTO old VALUES('','$ID','$Car','$Name','$Name','$Gender','$DOB','$Age','$Mobile','$A   ddress','$City','$EmailId')"

推荐答案

您在带符号INT中的列,该列包含最多2147483647的整数.您的值显然大于该值.您将需要根据其表示的数据对数据使用BIGINT或VARCHAR(电话号码应存储为VARCHAR/CHAR,因为您不会对它们进行数学运算).

Your column in a signed INT which holds integers up to 2147483647. Your value is clearly larger than that. You will need to use BIGINT or VARCHAR for that data depending on what it represents (phone numbers should be stored as VARCHAR/CHAR since you are not going to be doing math with them).

请参见整数类型(精确值)

这篇关于输入类型文本字段给出固定错误2147483647的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆