在网页上,我希望显示论坛列表(parent_id = 0),并为每个论坛显示该论坛及其subForums组中的最新(最新)3个主题 iPad3 Apr 12hierarchy max) parent_id (0 if Forum, link to other rows id if subForum)
id (autoinc) na
我已经尝试了1个小时,试图找出如何从数据库中提取一些东西,使用简单的SQL语法进行内部连接。SELECT topics.topic_id, topics.topic_subject, COUNT(posts.post_topic) AS comments
FROM topicsINNER JOIN posts ON topics