Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7532121
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T05:21:37+00:00 2026-05-30T05:21:37+00:00

For a notification system, I am trying to take multiple rows of completely seperate

  • 0

For a notification system, I am trying to take multiple rows of completely seperate data, and order them using a unix time stamp. The data from each row is selected by using a users USERID, and then the rows should be ordered from the time they occured.

for example, one of the tables being selected would be:

- USERID   msgid    timestamp
-   3        5       1234567

A final table after selecting all relevant data should look like:

- USERID    msgid    postid    playerpostid     friendrequestid     timestamp  
-   3         5                                                      1234567
-   3                  5                                             1234566
-   3        1234                                                    1234565
-   3                               542                              1234564

As you can see, the tables all combine, but the only thing connecting them is the USERID, and ordered by the timestamp.

Ive tried joins, unfortunately that multiples the results to a ridiculous amount of results.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T05:21:39+00:00Added an answer on May 30, 2026 at 5:21 am
    SELECT * FROM (
      SELECT 
        USERID, msgid, NULL AS postid, NULL AS playerpostid, NULL AS friendrequestid, timestamp
      FROM messages
      WHERE USERID=3
    
      UNION ALL
    
      SELECT 
        USERID, NULL AS msgid, postid, NULL AS playerpostid, NULL AS friendrequestid, timestamp
      FROM posts
      WHERE USERID=3
    
      UNION ALL
    
      SELECT 
        USERID, NULL AS msgid, NULL AS postid, playerpostid, NULL AS friendrequestid, timestamp
      FROM playerposts
      WHERE USERID=3
    
      UNION ALL
    
      SELECT 
        USERID, NULL AS msgid, NULL AS postid, NULL playerpostid, friendrequestid, timestamp
      FROM friendrequests
      WHERE USERID=3
    ) AS baseview
    ORDER BY timestamp
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to use the notification system in order to have a detail
HI, I am trying to send a simple notification using system.net.mail.mailmessage. I just pass
In an embedded Linux system, I'm trying to show a shutdown notification that should
Possible Duplicate: javascript: pause setTimeout(); Im using jQuery and working on a notification system
Im trying to build a simple faye realtime based notification system so I can
I'm trying to implement a notification system like Quoras, where changes is marked with
I'm trying to write a notification service (for completely legit non-spam purposes) in .NET
I'm trying to create a message notification for a web page using jQuery. The
I'm trying to display a notification using Easy Notification , but I don't want
I am trying to model a notification system where an event occurs during a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.