Home  >  Article  >  Backend Development  >  php如何循环输出评论与回复 mysql表结构是否有有关问题

php如何循环输出评论与回复 mysql表结构是否有有关问题

WBOY
WBOYOriginal
2016-06-13 13:36:48958browse

php怎么循环输出评论与回复 mysql表结构是否有问题
现在做的表:
发表评论与回复评论表
+------+----+---------+--------+
| id |uid | content | pid |
+------+----+---------+--------+
| 1 |AA | XXXXX | NULL | //这是评论的第一条
| 2 |BB | AAAAAAA | 1 | //这是回复第一条评论
| 3 |CC | BBBB | 2 | //回复第一条回复
| 4 |DD | ddddddd | 3 //回复第二条回复
| 5 |DD | ddddddd | 3 |
+------+----+---------+--------+
这相在程序里怎么循环输出啊






------解决方案--------------------
像QQ空间那种?
那种是两个for循环吧
回复回复的时候JS加个@谁谁谁

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn