PHP-Code:
$sql = "SELECT a.name, b.name FROM personen AS a JOIN gruppen AS b WHERE a.gruppe = b.id";
$result = mysql_query($sql);
while ($eintrag = mysql_fetch_assoc($result)) {
echo "<tr>";
foreach ($eintrag as $key => $value) {
echo "<td>$value </td>";
}
echo "</tr>\n";
}
Gruß hanspeter
Kommentar