gpt4 book ai didi

php - Pre mysql 输出与 Phpmyadmin 中处理的更新不同

转载 作者:行者123 更新时间:2023-11-29 14:39:59 25 4
gpt4 key购买 nike

$newInt = substr_replace($oldInt, $newDigit, $position, 1);
$newValue = (string)$newInt;
echo $newValue;

echo 00001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 (我想要什么!)

mysql_query("UPDATE table SET $fieldVariable = $newValue WHERE userID  = '".$_SESSION['userID']."' ")or die("Query failed:".mysql_error());

mysql记录显示999999999999999999999999999999999999999999999999999

mysql字段设置为varchar(100)

最佳答案

在 $newValue 周围添加引号,因为它是 VARCHAR 字段

mysql_query("UPDATE table SET $fieldVariable = '$newValue' WHERE userID  = '".$_SESSION['userID']."' ")or die("Query failed:".mysql_error());

关于php - Pre mysql 输出与 Phpmyadmin 中处理的更新不同,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8172981/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com