View Single Post
(#5 (permalink))
Old
Passionless Passionless is offline
Member
Passionless is on a distinguished road
 
Posts: 48
Join Date: Sep 2011
Default 09-23-2011, 11:17 PM

Hi,
Given your schema you should delete the 'topic_date' row and may be also 'topic_com', which I suppose hold the number of comments on a given topic (that info is already on the tables, just COUNT(*) it) and 'topic_by'.

I think there's at least a post row for each topic row (the topic's subject on the topic table and the topic's content on the post table) so just JOINing should work, since there is no topic without a post (LEFT JOIN) neither a post without a topic it belongs to (RIGHT JOIN).
I sincerely don't know why it behaves this way.

http://img268.imageshack.us/img268/3922/unledzdt.png
Reply With Quote