title: SQL: get all column records with same id
body: <p>I'm quite new to sql and I'm having trouble writing this<br>
  i have a table like this</p>
  
  <pre><code>id   name
  1   A
  2   B
  3   C
  1   D
  1   E
  1   F
  ...
  </code></pre>
  
  <p>I  want a query that will return to me the names of the ID i give it... say if i ask for 1, i want it to return A D E F
  i tried  this in PHP:</p>
  
  <pre><code>$result3 = mysql_query("SELECT name FROM table WHERE id='1'", $link);
  
      $pfilearray=array();
      $pfilearray=mysql_fetch_assoc($result3);
  
      print_r($pfilearray);
  </code></pre>
  
  <p>but this gives me only the first name found with id 1, what am i missing?</p>