gpt4 book ai didi

php - 最大数计算错误

转载 作者:可可西里 更新时间:2023-11-01 08:47:13 29 4
gpt4 key购买 nike

患者编号:1,2,3,4,5,6,7,8,9,10

 $result2=mysql_query("select max(patient_id) as maximum from outdoor");
$row2= mysql_fetch_array($result2);
echo $res=$row2['maximum'];

它的最大数量为 9 而不是 10。

最佳答案

试试这个

$sql = "select max(CONVERT(patient_id,UNSIGNED INTEGER)) as maximum from outdoor";

关于php - 最大数计算错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25305978/

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