【发布时间】:2014-06-14 14:09:24
【问题描述】:
这个问题有点新手,但我正在学习数据库。
所以我正在查询一列的总数,我想在 PHP 中显示它
$sumSql = "select sum(weight) as total_sum from master_drawing";
$sumParse = oci_parse($conn, $sumSql);
oci_bind_by_name($sumParse, "total_sum", $total);
oci_execute($sumParse);
while(oci_fetch($sumParse)){
echo $total;
}
但不知何故,错误是这样的:
警告:oci_bind_by_name():ORA-01036:C:\xampp\htdocs\WeltesInformationCenter\newEmptyPHP.php 第 30 行中的非法变量名称/编号
我在这里做错了什么?
【问题讨论】: