BP_Document:: total_group_document_count (intgroup_id美元)
计算给定组的文档总数。
描述
参数
- group_id美元
-
(int)(必需)
返回
(数组| bool | int)
源
文件:bp-document /类/ class-bp-document.php
Public static function total_group_document_count($group_id = 0) {global $bp, $wpdb;$total_count_document = (int) $wpdb->get_var("SELECT COUNT(*) FROM {$bp->document->table_name} WHERE group_id = {$group_id} AND folder_id = 0");//数据库调用ok;no - cache好;$total_count_folder = (int) $wpdb->get_var("SELECT COUNT(*) FROM {$bp->document->table_name_folder} WHERE group_id = {$group_id} AND parent = 0");//数据库调用ok;no - cache好;$total_count = $total_count_folder + $total_count_document;返回total_count美元;}
更新日志
版本 | 描述 |
---|---|
BuddyBoss 1.4.0 | 介绍了。 |