';
| |
Forum |
Dernier Post |
Topics |
Posts |
';
/*for($i = 0 ; $i <= 5 ; $i++)
{*/
while($row = mysql_fetch_assoc($result))
{
$topicsql = "SELECT
topic_id,
topic_subject,
topic_date,
topic_cat,
topic_by
FROM
topics
WHERE
topic_cat = " . $row['cat_id'] . "
ORDER BY
topic_date
DESC
LIMIT
1";
$topicsresult = mysql_query($topicsql);
$topicrow = mysql_fetch_assoc($topicsresult);
//echo "+++ " .$topicrow['topic_by'];
//echo '
' . $topicrow['topic_subject'] . '
//$posts_sql = "SELECT user_name FROM users WHERE ";
$id = $topicrow['topic_id'];
$posts_sql = "SELECT
posts.post_topic,
posts.post_content,
posts.post_date,
posts.post_by,
users.user_id,
users.user_name
FROM
posts
LEFT JOIN
users
ON
posts.post_by = users.user_id
WHERE
posts.post_topic = '".$id."' ";
$posts_result = mysql_query($posts_sql);
$posts_row = mysql_fetch_assoc($posts_result);
echo '
|
|
Par: ';
echo $posts_row['user_name'];
echo '
';
echo date('d-m-Y H:i:s', strtotime($topicrow['topic_date'])) ;
// echo '
// 04:02 ';
echo '
|
692 |
2,818 |
';
}
echo '
';
?>