It does work for the forums that dont have any populated threads or posts. But it still does not work for the one forum that is populated. It lists the threadname, UserId and Postime for the forum even though I change the dates several times. And even that
only works when I use a OR not an AND in the WHERE statement. Again the code is
SELECT Forum.ForumName, Forum.ForumDesc, Thread.ThreadName, aspnet_Users.UserName, Post.PostTime FROM aspnet_Users RIGHT OUTER JOIN Post ON aspnet_Users.UserId = Post.UserId RIGHT OUTER JOIN Thread ON Post.ThreadId = Thread.ThreadId RIGHT OUTER JOIN Forum
ON Thread.ForumId = Forum.ForumId RIGHT OUTER JOIN Menu ON Forum.MenuId = Menu.MenuId WHERE (Menu.MenuName = @Forum) OR (Thread.ThreadDate = @dete)
Code_warrior...
Member
251 Points
282 Posts
Re: Query problem - returns no details.
Apr 25, 2012 05:22 AM|LINK
It does work for the forums that dont have any populated threads or posts. But it still does not work for the one forum that is populated. It lists the threadname, UserId and Postime for the forum even though I change the dates several times. And even that only works when I use a OR not an AND in the WHERE statement. Again the code is
SELECT Forum.ForumName, Forum.ForumDesc, Thread.ThreadName, aspnet_Users.UserName, Post.PostTime FROM aspnet_Users RIGHT OUTER JOIN Post ON aspnet_Users.UserId = Post.UserId RIGHT OUTER JOIN Thread ON Post.ThreadId = Thread.ThreadId RIGHT OUTER JOIN Forum ON Thread.ForumId = Forum.ForumId RIGHT OUTER JOIN Menu ON Forum.MenuId = Menu.MenuId WHERE (Menu.MenuName = @Forum) OR (Thread.ThreadDate = @dete)