Jump to content

Ordering The Results Of Two Tables By One Field?


3raser

Recommended Posts

I'm creating a list that shows all of a user's recent posts and threads. I want to have all the threads/posts mixed together in one list, all descending by their dates (decided to go with dates and not IDs).

 

E.g:

 

Newest

[THREAD] Oct/11/12

Oct/10/12

Oct/8/12

..and so on

[THREAD]

[THREAD]

Latest

In order to do such a thing with one query you would need an activity table that contained .. The user id, The activity (like post or thread), an id for the post, and id for the thread, and most importantly the datetime of the action.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.