grlayouts Posted July 20, 2008 Share Posted July 20, 2008 can anyone understand why row[1] comes out the highest amount but row[0] just shows a random user.handle just picks a random user and not the one assigned as attackdetails.who with the ammount. ie attack who type unit amount 1 10730 3 0 91431 user 10730 is BOB but it displays another users name as row[0] $sql = "SELECT users.handle,max(attackdetails.amount) FROM users,attackdetails WHERE users.id=attackdetails.who AND attackdetails.type=4 GROUP BY type"; $r = mysql_query($sql); $row = mysql_fetch_row($r); tableEntry(array('Most Supply Stations Won in an Attack', $row[0], number_format($row[1])), 'align="center"'); endTable(); Quote Link to comment Share on other sites More sharing options...
grlayouts Posted July 20, 2008 Author Share Posted July 20, 2008 someone? Quote Link to comment Share on other sites More sharing options...
gizmola Posted July 20, 2008 Share Posted July 20, 2008 You'd probably need to provide the details of your database. People aren't mind readers. 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.