Jump to content

Ordering The Results Of Two Tables By One Field?


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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.