I'll give you all the short version of what I need and if it is enough for
you to help that would be great. I need to pull the last 10 updated topics
from a table and output them. However, the posts table lists each post and
then has a topic id. There is also a table of topics with topic id, title,
etc. I cannot just pull the last 10 posts in the post table because those
posts could all be for the same topic and I'm trying to output the last 10
updated topics (not posts). How can I do this? I can't find anything on the
subject. This is what I tried as a random guess:
$sql = "SELECT DISTINCT posts.topic_id, posts.forum_id,  topics.topic_title,
topics.topic_replies WHERE topics.topic_id = posts.topic_id DESC LIMIT 10";

Any ideas about what I need to do? I'm sure it is pretty simple.....

Regards,
Steve "KingZeus" Downs
Co-Webmaster:
http://www.cncrenegade.com


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to