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.";