Exactley. Hence the for loop:
PHP Code:
for($i = 0; $i <= $max; i++)
{
$q2 = "SELECT `id` FROM `Members` WHERE `maingame` = '".$row[$i]."'";
$result2 = mysql_query($q2);
echo $row[$i] . "-->" . mysql_num_rows($result);
}
$row[$i] is the game id (in the previous post I statically set $row[$i] = 1). However, $row is an array of game id's which are dynamically generated upon request. The for loop circulates through the entire array of game id's and calculates the amount of members have have the game id, $row[$i], as their main game.