Jump to content

cant understand why


grlayouts

Recommended Posts

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();

Link to comment
https://forums.phpfreaks.com/topic/115724-cant-understand-why/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.