Statistics (credits, duckets, diamonds) RevCMS disable staff displaying?
How can I disable staff displaying in statistics? I mean what do I need to do so that only ranks 1 to 7 are visible in the statistics?
Code:
PHP Code:
<?php
$sql = mysql_query("SELECT username, credits FROM users ORDER BY credits DESC LIMIT 0,9");
while($a = mysql_fetch_array($sql)) {
echo "<tr>
<td>".filter($a['username'])."</td>
<td align='right'>".Filter($a['credits'])."</td>
</tr>";
}
?>
It's showing all users, but I don't want that I were showed too (because I have "to many" credits) and I don't want that other users see how much I have. Hope someone understand what I'm trying to say and can help me :( :)
Really sorry for my bad english, I'm german.
Re: Statistics (credits, duckets, diamonds) RevCMS disable staff displaying?
Code:
<?php
$sql = mysql_query("SELECT username, credits FROM users WHERE `rank` <= '3' ORDER BY `credits` DESC LIMIT 10");
while($a = mysql_fetch_array($sql)) {
echo "<tr>
<td>".filter($a['username'])."</td>
<td align='right'>".Filter($a['credits'])."</td>
</tr>";
}
?>
Change '3' to whatever rank your staff rank starts
Re: Statistics (credits, duckets, diamonds) RevCMS disable staff displaying?
Quote:
Originally Posted by
asesinato
Code:
<?php
$sql = mysql_query("SELECT username, credits FROM users WHERE `rank` <= '3' ORDER BY `credits` DESC LIMIT 10");
while($a = mysql_fetch_array($sql)) {
echo "<tr>
<td>".filter($a['username'])."</td>
<td align='right'>".Filter($a['credits'])."</td>
</tr>";
}
?>
Change '3' to whatever rank your staff rank starts
Thank you, I thought it's that easy but I didn't knew ^^