标签: php mysql mysqli
我试图在表中的列中仅获取MAX值,我是否也需要在此处使用fetch_assoc();? (获得单一价值)?
fetch_assoc();
$query1 = "SELECT MAX(`cost`) AS MaxNum FROM `ccotTbl`"; $result = $conn->query($query1); $nums1 = $result->fetch_assoc(); $maxNum = $nums1['MaxNum']; $_maxNum = $maxNum;
由于