Re: sql query with 3 tables
Posted by:
pan ac
Date: August 07, 2004 05:09AM
On this problem i tried the sql as follows:
SELECT p.author_id, p.topic_id, p.forum_id, p.post_date, p.icon_id, t.title, t.views, t.posts, f.name
FROM p, f, t
WHERE f.id = t.forum_id AND p.topic_id = t.tid
GROUP BY p.topic_id
ORDER BY p.post_date DESC
The results is almost there but instead of showing the lates posts
by members, it shows order posts.
The Group By sucessfully filtered out the duplicate post title,
the it seems to me the ORDER BY p.post_date DESC has not effect-
can't grab the latest post made by members,
the system does not return the latest entry, but rather seems randomly.
Subject
Written By
Posted
Re: sql query with 3 tables
August 07, 2004 05:09AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.