Location: PHPKode > scripts > WH Social > wh_social/framework/class/rand_class.php
<?php

    function rand_members() {
        $rand_sql = "SELECT id, name, avatar FROM members ORDER BY RAND() LIMIT 1";
        $rand_members = mysql_query($rand_sql) OR die(mysql_error());

        $rand_result = mysql_fetch_row($rand_members);
        $rand_avatar = $rand_result[2];
        $rand_name   = $rand_result[1];

        return '<img src="' . htmlentities($rand_avatar) . '" class="Avatar" border="0" vspace="5" title="' . htmlentities($rand_name, ENT_QUOTES) . '" alt="Avatar"><br><small>' . htmlentities($rand_name, ENT_QUOTES) . '</small>';
        }

?>
Return current item: WH Social