Now, i want to find a specific users rank, but i am stuck. This is within joomla.
This is the code i have that is the closest, buuuut, it don't work

The point here is that i want to know the rank of user 42 specificly.
Anyone?
- Code: Select all
$query = "SELECT * FROM lbzi4_jvarcade_leaderboard` ORDER BY points DESC";
$db->setQuery($query);
$rows = $db->loadObjectList();
$i = 0;
foreach ( $rows as $row ) {
while ($row->userid <>42){
$i++;
}
echo $i;
echo ": " . $row->userid ."<br>";
}

