试图获得“交易”表中(总)列的总和,其中 type="outbound" 但我无法将其打印出来。
$stmt4 = $dbcon->prepare("SELECT SUM(total) FROM transactions WHERE proid=$id ");
$stmt4->execute();
$thetotal= $stmt4->fetch(PDO::FETCH_ASSOC);
echo $thetotal;
我收到这个错误
(..) 中的数组到字符串转换
我如何回显总列的总和?
森林海
牛魔王的故事