dsa4214 2015-08-25 18:17
浏览 24
已采纳

移动没有保存在数据库中并在检索时生成2147483647 [重复]

This question already has an answer here:

Trying to get mobile no saved in the database with the following html5 validation and on every entry in db insted of the mobile no put 2147483647 gets saved.Please Help.Stuck

<label for="su_mobile">Mobile No</label>
            </span>
            <input type="tel" id="su_mobile" name="su_mobile" pattern="^[789]\d{9}$" title='Phone Number (Format:10 digits starting with 9/8/7 )' placeholder="No which you wanna get recharged" required></input><br/><br/>

$yo_mobile=@mysqli_real_escape_string($dbc, trim($_POST['su_mobile']));




  <label for="fi_mob">Mobile No</label>
            <br/>
            <input type="text" id="fi_mob" name="fi_mob" value="<?php
        $dbc = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME)
            or die('Error communicating to MySQL server.');
            $cool=$_SESSION['user_id'];
    $a="SELECT * FROM userdata WHERE user_id='$cool'";
    $name = mysqli_query($dbc,$a);
    while($row = mysqli_fetch_array($name))
    {
      $queried_name = $row['mobile'];
      echo $queried_name;
    }
    mysqli_close($dbc);
    ?>" readonly></input><br/>
</div>
  • 写回答

1条回答 默认 最新

  • dongmu6225 2015-08-25 18:22
    关注

    The largest value for mysql is 2147483647. Goto your specific table (one storing the mobile number) and change the column's type from int to bigint.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 用twincat控制!
  • ¥15 请问一下这个运行结果是怎么来的
  • ¥15 单通道放大电路的工作原理
  • ¥30 YOLO检测微调结果p为1
  • ¥20 求快手直播间榜单匿名采集ID用户名简单能学会的
  • ¥15 DS18B20内部ADC模数转换器
  • ¥15 做个有关计算的小程序
  • ¥15 如何用MATLAB实现以下三个公式(有相互嵌套)
  • ¥30 关于#算法#的问题:运用EViews第九版本进行一系列计量经济学的时间数列数据回归分析预测问题 求各位帮我解答一下
  • ¥15 setInterval 页面闪烁,怎么解决