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(); Link to comment https://forums.phpfreaks.com/topic/115724-cant-understand-why/ Share on other sites More sharing options...
grlayouts Posted July 20, 2008 Author Share Posted July 20, 2008 someone? Link to comment https://forums.phpfreaks.com/topic/115724-cant-understand-why/#findComment-594949 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. Link to comment https://forums.phpfreaks.com/topic/115724-cant-understand-why/#findComment-594952 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.