sum 求和
优质
小牛编辑
131浏览
2023-12-01
sum
某个列字段相加
sum($table, $column, $where)table [string]
表名.
column [string]
查询的列.
where (optional) [array]
WHERE 条件.
table [string]
The table name.
join [array]
Table relativity for table joining.
column [string]
The target column will be calculated.
where (optional) [array]
The WHERE clause to filter records.
$total = $database->sum("account", "money");echo "We have $" . $total;