I'm probably going in the complete wrong direction but I want to get an array of data from the database and then use that array in another SQL statement.
Here is my current code:
  $result = mysql_query($query_friend_club_count) or die(mysql_error());
  while($row = mysql_fetch_array($result)){
  $row['idPerson']. " - ". $row['idFriend'];
  $idFriend = $row['idFriend'];
  $array = $idFriend',';
  $query_friends = "SELECT * FROM whosout WHERE idPerson IN ('$array')";
  $query_friends_run = mysql_query($query_friends);
  $friendCounter = mysql_num_rows($query_friends_run);
  echo $friendCounter;
  } 
I'm getting a error of:
syntax error, unexpected T_CONSTANT_ENCAPSED_STRING
Don't know if that helps.
Any suggestions would be really helpful as I've been stuck on this for ages!!
 
     
     
    