[TOC]
## 留言板
### PDO
```
$pdo = new PDO($dsn, $username, $password, $attr);
$sql ='select id, title, content FROM message where user name=:user name
$stmt= $pdo->prepare($sql);
$stmt->execute([:user_name=>$user namel);
$result= $stmt->fetchAll(PDO: FETCH-ASSOC);
```
## 无限分类
![](https://box.kancloud.cn/d45cbd639a5b000716b8b73a20bb2029_1728x846.jpg)
方法一 : 根据 pid
方法二 : 根据 path