Jump to content
MakeWebGames

Recommended Posts

Posted

I just got done with a bunch of updates, and a referral hall of fame was last on my list. I got everything done, i was so happy. Now im stuck on the hall of fame :(

See, normally the hall of fame uses a code like this:

function hof_level()

{

global $ir,$c,$userid;

print "Showing the 40 users with the highest levels

<table width=75%><tr style='background:gray'> <th>Pos</th> <th>User</th> <th>Level</th> </tr>";

$q=mysql_query("SELECT u.*,g.* FROM users u LEFT JOIN gangs g ON g.gangID=u.gang WHERE u.user_level != 7 && u.user_level != 10 && u.user_level != 0 && u.user_level != 2 ORDER BY level DESC,userid ASC LIMIT 40", $c);

$p=0;

while($r=mysql_fetch_array($q))

{

$p++;

if($r['userid'] == $userid) { $t="";$et=""; } else { $t="";$et=""; }

print "<tr> <td>$t$p$et</td> <td>$t{$r['gangPREF']} {$r['username']} [{$r['userid']}]$et</td> <td>$t{$r['level']}$et</td> </tr>";

}

That ones for "level"

But getting a number of the amount of referrals you have involves a code like this:

$rr=mysql_query("SELECT * FROM referals WHERE refREFER={$r['userid']}",$c);

I was thinking of adding that in there, and changing the order by level to order by $rr, but i get errors

Anyone know whats wrong? Im completely baffled, please help!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...