title: PHP - Get data from database then fetch it again
body: <p>I am trying to get data from database then fetch it again with different mysql_query using while() in both query , but the problem it is producing results more than one time because i used while in first query . So any answer to get all data without while() for first query ?</p>
  
  <pre><code>$AllFrnd = "SELECT friend , followers FROM frndlist WHERE userid = '".$_SESSION[' user_id ']."' ORDER BY id DESC";
  $getfrnd = mysql_query($AllFrnd);
  while($frnd = mysql_fetch_array($getfrnd)) {
      $query2 = "SELECT * FROM post WHERE (userid ='".$frnd['friend']."') OR (userid =       '".$frnd['followers']."') OR (userid = '".$_SESSION[' user_id ']."') ORDER BY id DESC";
      $rs = mysql_query($query2);
      while($row = mysql_fetch_array($rs)) {
          echo ''.$row['content'].'';
  </code></pre>