title: Double while loop with MYSQL return
body: <p>MySQL double while loop in php:</p>
  
  <pre><code>$geta=mysql_query("SELECT id FROM table1 WHERE id&lt;50");
  while($row=mysql_fetch_array($geta)){
  while($row2=mysql_fetch_array($geta)){
  $id1=$row['id'];
  $id2=$row2['id'];
  echo "$id1 and $id2";
  }
  }
  </code></pre>
  
  <p>I'm trying to make every possible combination of id with another id.</p>
  
  <p>Not sure what is wrong with it...output is just a list of id1...</p>
  
  <p>What am I doing wrong here?</p>