Hi,
I am trying to combine two notifications tables, posts and comments and order them by created date, and display all notifications in a list, i tried joining them and able to pull the data but i want a common created date so that i can order them, please let me know how can i do that
SELECT nc.id, nc.CommentId, c.CommentText, nc.CreatedOn, np.Id,np.PostId,p.Post, np.CreatedOn, m.NotificationType,m.Description, m.Id as notificationid
FROM tbl_notifications_master AS m
left JOIN tbl_notifications_comment AS nc ON nc.NotificationId = m.Id
left JOIN tbl_comments AS c ON c.CommentId = nc.CommentId
left JOIN tbl_notifications_post AS np on np.NotificationId = m.Id
left JOIN tbl_posts AS p ON p.Id = np.PostId
