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

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

WBOY
Release: 2016-06-13 13:36:48
Original
980 people have browsed it

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加个@谁谁谁

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template