Hab noch nie mit Joins gearbeitet aber jetzt knapp 2 std mit Forum und Praxisbuch rumgeschaut geht aber irgendwie alles nicht...
Also Tabelle infoaccount hat den namen und die tabelle spielaccount die punkte brauch aber leider beides für die Tabelle...
PHP-Code:
<table class="innen" width="80%">
<tr>
<th>Platz</th>
<th>Name</th>
<th>Allianz</th>
<th>Punkte</th>
</tr>
<?php
$i = 1;
$statement = "
select
punkte_gesamt,
name
from
spielaccount left join infoaccount
on
spielaccount.benutzerid = infoaccount.benutzerid";
if($result = mysql_query($statement))
{
while($row = mysql_fetch_array($result))
{
?>
<tr>
<th class="B">
<?php
print $i;
$i++;
?>
</th>
<td>
<?php
print $row['name'];
?>
</td>
<td>
allianz
</td>
<td>
<?php
print $row['punkte_gesamt'];
?>
</td>
</tr>
<?php
}
}
?>
</table>