Hi!
Code:
$querya = $vbulletin->db->query_read("
SELECT post.postid, post.pagetext, post.userid, post.username, thread.forumid, thread.title as titulo, thread.threadid, forum.forumid, forum.title
FROM " . TABLE_PREFIX . "post as post
LEFT JOIN " . TABLE_PREFIX . "thread as thread on (post.threadid = thread.threadid)
LEFT JOIN " . TABLE_PREFIX . "forum as forum on (thread.forumid = forum.forumid)
WHERE forum.forumid not in ($excluded)
ORDER BY postid DESC
LIMIT $limit"
);
I got this table
POST 4 - THREAD 1 - USERX
POST 3 - THREAD 2 - USERX
POST 2 - THREAD 1 - USERX
POST 1 - THREAD 3 - USERX
I only want 1 post from every thread, in this example last 4 posts, 2 from thread 1 and other 2 from thread 2 and 3. If I only want to show 1 post from thread 1.. What i have to make?
Thanks!