Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
541 views
in Technique[技术] by (71.8m points)

mysql高效查询评论及回复内容,并且分页,如何查?

已有评论表结构:
id,parentid,content,ctime

id是评论id,parentid是父级评论id,也就是被回复的评论id,parentid不为空时,表示这是一条回复评论。

如何通过这张表,高效的查询出评论及其回复的评论,并且分页。回复评论会有多层。

各位sql大神,显示一下身手,我自己写的效率太低,分页还会混乱。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...