Another hack for the stats page I just implemented....
Because I only allow a max wager of 25 per outcome, the total vCash movement is small, and there will be a lot of people hovering at or near the initial 500 mark..
so in order to only display people that have placed a wager as the "richest people" on the stats page I made the following change:
functions/functions_vbookie.php
find:
PHP Code:
$q = "SELECT username, vbookie_cash AS cash FROM " . TABLE_PREFIX . "user ORDER BY cash DESC LIMIT 5";
and replace it with:
PHP Code:
$q = "SELECT Distinct usr.username, usr.vbookie_cash AS cash FROM " . TABLE_PREFIX . "user as usr
LEFT JOIN " . TABLE_PREFIX . "vbookie_bets_placed AS bets ON bets.userid=usr.userid
Where bets.userid=usr.userid
ORDER BY cash DESC LIMIT 20";
note you can change LIMIT 20 to the number of people you want to display, I chose 20, but can set it to whatever you want