session_begin();
$sql = 'SELECT p.*, t.*, u.user_id, u.username FROM ' . POSTS_TABLE . ' p JOIN ' . TOPICS_TABLE . ' t JOIN ' . USERS_TABLE . ' u
ON p.topic_id = t.topic_id
AND u.user_id = p.poster_id
ORDER BY p.post_id DESC LIMIT 9';
$result = $db->sql_query($sql);
$texte_forum = "";
while ($row = $db->sql_fetchrow($result))
{
$texte_forum .= '' . substr(utf8_decode($row['topic_title']), 0, 28) . '... ';
$texte_forum .= 'Par : ' . substr(utf8_decode($row['username']), 0, 15) . '
';
}
?>