PHP Code:
<?
connectTOforum();
$query = mysql_query("SELECT * from user ORDER BY posts DESC LIMIT 0, 5");
while($row = mysql_fetch_array($query)){
$query2 = mysql_query("SELECT * from userfield WHERE userid='$row[userid]' ORDER BY field5 DESC LIMIT 5");
$info3 = mysql_fetch_array($query2); ?>
<li><? echo($row['username']); ?> - <? echo($info3['field5']); ?></a></li>
<? } ?>
That's what I have on my website, and it displays, I hope it helps, replace what needs to be replaced to display it from the ip address?