<?php
mysql_connect(localhost, xxx, xxx) OR
die(Keine Verbindung zum Server. Fehlermeldung:.mysql_error());
mysql_select_db(wbblite) OR
die(Keine Verbindung zur Datenbank. Fehlermeldung: .mysql_error());
$sql = SELECT t1.threadid, t1.topic, t1.lastposterid , t1.lastposter, t1.views, t2.title
FROM bb1_threads t1 LEFT JOIN bb1_boards t2
ON t1.boardid = t2.boardid
ORDER BY t1.lastposttime DESC
LIMIT 10;;
$res = mysql_query($sql);
while($row = mysql_fetch_array($res, MYSQL_ASSOC)) {
$tbl_row .= <tr>
<td align='left'>.$row['topic'].</td>
<td align='center'>.$row['lastposter'].</td>
<td align='center'>.$row['views'].</td>
</tr>;
}
echo-><table align=center>
<tr>
<th width=200 align=left>Thema</th>
<th width=100 align=center>Name</th>
<th width=50 align=center>Klicks</th>
</tr>
->.$tbl_row.'
</table>';
?>