<?
$dbh = new PDO("mysql:host=localhost;dbname=mmaaaco_cjorgensen", "mmaaaco_cjorgen", "TD}*;vhNWkT$");
$sql = $dbh->prepare("SELECT DISTINCT (joins_customers.customer_id), joins_customers.name FROM joins_customers group by joins_customers.customer_id");
$sql->execute();
?>
<table>

<?
while ($row = $sql->fetch()){
echo '<tr>';
$id = $row[0];	
$name= $row[1];
$getstuff = $dbh->prepare("select product from joins_orders where customer_id = ?");
  $getstuff->bindValue(1,$id);
  $getstuff->execute();
  unset($product);
   while($getrow = $getstuff->fetch()){
$product  .= $getrow[0].'<br/>';
  }
  echo '<td>'.$name.'</td><td>'.$product.'</td>';
  echo '</tr>';
}
?>
</table>