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 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?