abstract:<?php require('1.php'); $sql = "SELECT * FROM `user` WHERE `id` > :id"; $stmt = $pdo->prepare($sql); $stmt->execut
<?php require('1.php'); $sql = "SELECT * FROM `user` WHERE `id` > :id"; $stmt = $pdo->prepare($sql); $stmt->execute([":id"=>0]); $rows = []; while( $row = $stmt->fetch(PDO::FETCH_ASSOC)){ $rows[] = $row; } $stmt = null; $pdo = null; ?> <style> table,th,td { border: 1px solid #333; } table { text-align: center; border: 1px solid #333; width: 50%; margin: 30px auto; border-collapse: collapse; } table caption { font-size: 1.5em; font-weight: bolder; margin-bottom: 15px; } table tr:first-child { background-color: lightblue; } </style> <table> <caption>用户信息表</caption> <tr> <th>ID</th> <th>姓名</th> <th>邮箱</th> <th>性别</th> <th>是否在线</th> <th>注册时间</th> </tr> <?php foreach ($rows as $row): ?> <tr> <td><?php echo $row['id'] ?></td> <td><?php echo $row['name'] ?></td> <td><?php echo $row['email'] ?></td> <td><?php echo $row['sex'] == 0 ? '男': '女'; ?></td> <td><?php echo $row['status'] == 1 ? '在线': '不在线'; ?></td> <td><?php echo date("Y/m/d",$row['create_time']) ?></td> </tr> <?php endforeach;?> </table>
Correcting teacher:西门大官人Correction time:2019-02-17 17:40:34
Teacher's summary:作业写的不错,不过1.php的内容是什么?