ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、视频、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
### sum 某个列字段相加 sum($table, $column, $where) * ##### table [string] 表名. * ##### column [string] 查询的列. * ##### where (optional) [array] WHERE 条件. sum($table, $join, $column, $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. Return: [number] 相加的值. The type of returned data is number. ~~~ $total = $database->sum("account", "money"); echo "We have $" . $total; ~~~