Forums
-
- Forum
- Posts
-
- Installation
- 28,499
- Troubleshooting
- 62,607
- Themes
- 10,431
- Plugins
- 15,360
- Requests & Feedback
- 14,971
- Showcase
- 3,257
-
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;
?>