1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
|
<?php
$database = '';
$server = '';
$user = '';
$pass = '';
$n = '';
$connection = mysql_connect($server, $user, $pass);
$select = mysql_select_db($database, $connection);
$sql = "SELECT posts.*, thread.topic FROM bb".$n."_posts AS posts LEFT JOIN bb".$n."_threads AS threads ON posts.threadid = threads.threadid ORDER BY posts.posttime DESC LIMIT 0,5;";
$result = mysql_query($sql,$connection);
while($row = mysql_fetch_array($result,MYSQL_BOTH)) {
echo("<strong><a href=\"http://www.url.de/thread.php?postid=".$row['postid']."#post".$row['postid']."\">".$row['topic']."</a></strong>, geschrieben von <strong>".$row['username']."</strong> um <strong>".date("H:i - d.m.Y",$row['posttime'])."</strong><br />");
}
?> |