![](/img/trans.png)
[英]The .htaccess file is causing a strange "Maximum number of redirect reached" error
[英]error in maximum number calculation
patient_id: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";
用這個
$sql = "select GREATEST(patient_id) as maximum from outdoor";
例如:
SELECT GREATEST(2,1);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.