Forums
-
- Forum
- Posts
-
- Installation
- 28,380
- Troubleshooting
- 62,255
- Themes
- 10,391
- Plugins
- 15,313
- Requests & Feedback
- 14,907
- Showcase
- 3,252
-
That is with bbPress 1.0 right? the object_type is for 1.0
You get nothing using get_results because it returns an array – use get_var instead
<?php
global $bbdb;
$result=$bbdb->get_var("SELECT SUM(meta_value) FROM bb_meta WHERE object_type='bb_topic' AND meta_key='views'");
echo $result;
?>
See also: WordPress.org • bbPress.org • BuddyPress.org • Matt • Blog RSS