dpwdldgn43486 2012-06-04 09:18
浏览 53

MySQL在执行插入查询时存储错误的值

Whenever I am inserting data into mysql database wiht below insert query then query runs successfully but when I check the data from database then it show some other values rather than the original values whatever I have inserted through the query . I use PHP and MySQL to execute the insert query. Please if anyone have any solution then please help me to resolve this problem.

My Code is :

<?php

$conn = mysql_connect('localhost','root','asterisk') or die("Cannot Connect with Databse") ; //connect with database
mysql_selectdb('adore3', $conn) or die("Cannot Select the Database  ") ;//select database

$query_insert="INSERT INTO cc_transfer VALUES ('', '528', '258', '1', '2012-5-5 4:4:4','5555555558888888','99999994444444',0);"; 
$r = mysql_query($query_insert);
if($r)
{
echo "Inserted";

}
?>

But when I check the data then I don't found the values 5555555558888888 and 99999994444444 , there are some garbage values in both field 2147483647.

  • 写回答

1条回答 默认 最新

  • douyu0792 2012-06-05 12:17
    关注

    The values you are trying to store are larger than the integer data type I assume you have set for the field in db. The 2147483647 is the max integer value that can be stored. Change the data type for the field (to long values).

    评论

报告相同问题?

悬赏问题

  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 AT89C51控制8位八段数码管显示时钟。
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥50 求一个win系统下运行的可自动抓取arm64架构deb安装包和其依赖包的软件。