我的桌子目前的外观
我想要一个使用行跨度的侧列,该列具有支付期间并将该支付期间的日期分组在一起。我希望主管能够创建一个新的支付期,该支付期在数据库中生成一个整数,然后行跨度将对该支付期内提交的任何数据进行分组。
我当前的表代码:
<div class="table-responsive">
<table id="editable_table" class="table table-bordered table-striped" data-editable="true" data-buttons-toolbar=".toolbar" data-search="true"data-show-refresh="true" >
<thead>
<tr>
<th>Index</th>
<th>Employee ID</th>
<th>Username</th>
<th>Date</th>
<th>Time In</th>
<th>Time Out</th>
<th>Total Hours</th>
<th>Submit Status</th>
<th>Approved Status</th>
<th>Time Change</th>
<th>Edit</th>
</tr>
</thead>
<tbody>
<?php
while($row = $res->fetch()){
echo '
<tr>
<td>'.$row["id"].'</td>
<td>'.$row["user_id"].'</td>
<td>'.$row["name"].'</td>
<td>'.$row["submit_day"].'</td>
<td>'.$row["time_in"].'</td>
<td>'.$row["time_out"].'</td>
<td>'.$row["total_hours"].'</td>
<td>'.$row["submit_status"].'</td>
<td style="color:green;">'.$row["approve_status"].'</td>
<td>'.$row["change_request"].'</td>
<td><center><a id="editbtn" href="action.php?id='.$row["id"].'"><span class="glyphicon glyphicon-edit"></span></a></td>
</tr>';
}
?>
</tbody>
</table>
</div>
我不确定如何使用 rowspan 来整理数据,使其看起来像这样: 示例表
慕尼黑的夜晚无繁华