|
Hi everybody,
I have a problem with selecting using 2 tables here is the definition:
Table1: forum_topics (id_topic,subject ,topic_date)
Table2: forum_posts (id_post,id_topic,id_user,post,post_date)
as you can guess table 1 keeps the topics and table 2 contains the posts for topics.
Now I want to display last 10 topics on homepage with following data:
- name of topic,
- the id_user who posted last to the topic
and want to order them in a way that the topic which has the last post will be displayed at top.
is it posibble to make all with one query. Or is it a better way to handle it with php? Which one is faster? which one is reliable?
If it is posible to make it with one query how can I do this. I tried some querries but cant order it by last post
Thanks for your help.
|