ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、视频、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
### count 获取数据表中的行数 count($table, $where) * ##### table [string] 表名. * ##### where (optional) [array] WHERE 条件. count($table, $join, $column, $where) * ##### table [string] 表名. * ##### join [array] 多表查询. * ##### column [string] 需要统计的字段. * ##### where (optional) [array] WHERE 条件. Return: [number] 行的数量. >返回的是数字类型. ~~~ $count = $database->count("account", [ "gender" => "female" ]); echo "We have " . $count . " female users."; ~~~