Legaci Posted June 24, 2013 Share Posted June 24, 2013 This code is almost there it notices the users it selects from but i should show #2 but it dont it shows #3 on all accounts { global $f; $q_ry=array(); $q_ry="SELECT * FROM `members_extra` WHERE `my_experience` >= '".$pl['my_experience']."'"; $pl_rank=mysql_query($q_ry); $fara=mysql_num_rows($pl_rank); echo"<tr><td align = 'left'><b>Game rank:</td><td align='left'>#".$fara."</b></td></tr> ";} any ideas Quote Link to comment Share on other sites More sharing options...
Guest Posted June 24, 2013 Share Posted June 24, 2013 You titled it "new engine", so are you creating a new engine? Also can you explain your problem more? I don't understand it at all. Quote Link to comment Share on other sites More sharing options...
Legaci Posted June 24, 2013 Author Share Posted June 24, 2013 its the RC engine sorry basically this code ive built is to rank users by experience in the game and it is shown in there stats bar but is shows every user as #3 so its not ranking anyone buy experience Quote Link to comment Share on other sites More sharing options...
Guest Posted June 24, 2013 Share Posted June 24, 2013 Care to post the whole code? Quote Link to comment Share on other sites More sharing options...
Legaci Posted June 24, 2013 Author Share Posted June 24, 2013 that is almost it the rest is other code <tr><td align = 'left'><b>Money:</b> </td><td align = 'left'><span id = 'moneyc'>\$",number_format($pl['wallet']),"</span></td></tr> <tr><td align = 'left'><b>Level:</b> </td><td align = 'left'>".$pl['my_level']; { global $f; $q_ry=array(); $q_ry="SELECT * FROM `members_extra` WHERE `my_experience` >= '".$pl['my_experience']."'"; $pl_rank=mysql_query($q_ry); $fara=mysql_num_rows($pl_rank); echo"<tr><td align = 'left'><b>Game rank:</td><td align='left'>#".$fara."</b></td></tr> ";} $q_ry = array(); $q_ry = "SELECT `my_experience`,`my_crimeexp` FROM `members_extra` WHERE `playerid` = '".mysql_real_escape_string($_SESSION['playerid'])."'"; $lvl = array(); $lvl = mysql_query($q_ry); $lv = mysql_fetch_array($lvl); if(($lv['my_experience']+($lv['my_crimeexp']/$pl['my_level'])) > exp_level($pl['my_level'])) { echo " [<a href='levelup.php'>Upgrade</a>]"; } echo "</td></tr> Quote Link to comment Share on other sites More sharing options...
Guest Posted June 24, 2013 Share Posted June 24, 2013 Why is there a global in the middle of the code is a function meant to be above that? Quote Link to comment Share on other sites More sharing options...
Legaci Posted June 24, 2013 Author Share Posted June 24, 2013 no let me remove thats a fault Quote Link to comment Share on other sites More sharing options...
Legaci Posted June 24, 2013 Author Share Posted June 24, 2013 still doesnt work Quote Link to comment Share on other sites More sharing options...
sniko Posted June 25, 2013 Share Posted June 25, 2013 Because $fara=mysql_num_rows($pl_rank); echo"<tr><td align = 'left'><b>Game rank:</td><td align='left'>#".$fara."</b></td></tr> ";} You're echoing the amount of rows. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.