我正在创建预约系统,但目前我遇到了显示多个约会的麻烦。我现在只回应一个约会,我的目标是让用户在一段时间或循环中查看所有约会。我不确定显示第二次约会的约会值所需的正确样式等。在我的数据库中,需要为登录用户查看许多约会。
<?php
$user_id = $_SESSION['user_id'];
$sql = "SELECT
points.appoint_date,
beauticians.b_firstname,
users.username,
service.service_name
FROM points
INNER JOIN service ON service.service_id = service.service_id
INNER JOIN beauticians ON beauticians.beautician_id = beauticians.beautician_id
INNER JOIN users ON users.id = users.id";
$query = $connect->query($sql);
$result = $query->fetch_array();
// close database connection
$connect->close();
?>
<!DOCTYPE html>
<html>
<head>
<title>Home</title>
</head>
<body>
<ul>
<li>Hello, <?php echo $result['username'] ?> </li>
<li>Hello, <?php echo $result['b_firstname'] ?> </li>
<li>Hello, <?php echo $result['service_name'] ?> </li>
<li>Hello, <?php echo $result['appoint_date'] ?> </li>
</ul>
</body>
</html
答案 0 :(得分:0)
您必须获取结果的每一行,然后显示它。
<div class="select-type__wrapper">
<div class="row">
<div class="col-sm-6">
<!-- ngIf: device === 'phone' -->
<!-- ngIf: device !== 'phone' -->
<div ng-if="device !== 'phone'" class="block ng-scope">
<a ng-activate="" ng-click="startApplication('?json=true')" class="btn btn-answer first ng-scope ng-click-active"></i>
</a>
</div>
<!-- end ngIf: device !== 'phone' -->
</div>
<div class="col-sm-6">
<!-- ngIf: device === 'phone' -->
<!-- ngIf: device !== 'phone' -->
<div ng-if="device !== 'phone'" class="block second ng-scope">
<a ng-activate="" ng-click="startApplication('?parent-user=true&json=true')" class="btn btn-answer ng-scope">
</div>
<!-- end ngIf: device !== 'phone' -->
</div>
</div>
</div>