$result = mysql_query("SELECT * FROM users ORDER BY surname");
while($myrow = mysql_fetch_assoc($result))
{
$id = $myrow['id'];
$name = $myrow['name'];
$second_name = $myrow['second_name'];
$surname = $myrow['surname'];
$res = mysql_query("SELECT value FROM bunch WHERE id_user = '$id' ");
while ($mr = mysql_fetch_assoc($res))
{
$music = $mr['value'] . ', ';
}
echo "<table><tr>";
echo "<td> <b>Имя:</b> " . $surname . " " . $name . " " . $id . "</td></tr>";
echo "<tr><td> <b>Музыка:</b> " . $music . "</td></tr>";
}
_____________
Идеальной защиты не существует...