Location: PHPKode > scripts > WH Social > wh_social/framework/functions/statistic.php
<?php

    function stat_members() {
        $inquiry = mysql_query("SELECT id FROM members") OR die(mysql_error());
        $total = intval(mysql_num_rows($inquiry));
        echo '<strong>' . (int)$total . '</strong>';
        }

    function stat_topics() {
        $inquiry = mysql_query("SELECT id FROM topics") OR die(mysql_error());
        $total = intval(mysql_num_rows($inquiry));
        echo '<strong>' . (int)$total . '</strong>';
        }

    function stat_pinboards() {
        $inquiry = mysql_query("SELECT id FROM pinboard") OR die(mysql_error());
        $total = intval(mysql_num_rows($inquiry));
        echo '<strong>' . (int)$total . '</strong>';
        }

    function stat_photos() {
        $inquiry = mysql_query("SELECT id FROM photos") OR die(mysql_error());
        $total = intval(mysql_num_rows($inquiry));
        echo '<strong>' . (int)$total . '</strong>';
        }

    function stat_comments() {
        $inquiry = mysql_query("SELECT id FROM comments") OR die(mysql_error());
        $total = intval(mysql_num_rows($inquiry));
        echo '<strong>' . (int)$total . '</strong>';
        }

    function stat_discussions() {
        $inquiry = mysql_query("SELECT id FROM discussions") OR die(mysql_error());
        $total = intval(mysql_num_rows($inquiry));
        echo '<strong>' . (int)$total . '</strong>';
        }

    function stat_news() {
        $inquiry = mysql_query("SELECT id FROM news WHERE `check` = '1'") OR die(mysql_error());
        $total = intval(mysql_num_rows($inquiry));
        echo '<strong>' . (int)$total . '</strong>';
        }

    function stat_friends() {
        $inquiry = mysql_query("SELECT friends FROM members") OR die(mysql_error());
        $total = intval(mysql_num_rows($inquiry));
        echo '<strong>' . (int)$total . '</strong>';
        }

    function stat_guestbook() {
        $inquiry = mysql_query("SELECT id FROM guestbook") OR die(mysql_error());
        $total = intval(mysql_num_rows($inquiry));
        echo '<strong>' . (int)$total . '</strong>';
        }

    function stat_messages() {
        $inquiry = mysql_query("SELECT msg FROM messages") OR die(mysql_error());
        $total = intval(mysql_num_rows($inquiry));
        echo '<strong>' . (int)$total . '</strong>';
        }

    function stat_events() {
        $inquiry = mysql_query("SELECT id FROM events") OR die(mysql_error());
        $total = intval(mysql_num_rows($inquiry));
        echo '<strong>' . (int)$total . '</strong>';
        }

?>
Return current item: WH Social