这是我本周的第二个问题(到目前为止)。我的第一个实现了成功的解决方案,所以我认为这个也可以很幸运。我想布局/设计我的查询以这种方式输出的返回:
date 1 | id | time | updated by | Status Update
| 1 | 04:06 | user1 | this is a remark
| 2 | 05:05 | user2 | this is again a remark
| 3 | 05:08 | user1 | this is another remark
| 4 | 07:09 | user3 | and this one also
date 2 | id | time | updated by | Status Update
| 5 | 04:06 | user3 | this is a remark for day 2
| 6 | 05:05 | user3 | this is again a remark for day 2
date 3 | id | time | updated by | Status Update
| 7 | 04:06 | user1 | this is a remark
| 8 | 05:05 | user2 | this is again a remark
| 9 | 05:08 | user2 | this is another remark
| 10 | 07:09 | user3 | and this one also
这是我的php代码...
mysql declaration here
{
echo "<table border='0' align=center class='tablefont'>
<tr class='colheadbg'>
<th>Date</th>
<th>ID</th>
<th>Time</th>
<th>Updated by</th>
<th>Status Update</th>
</tr>";
while($info = mysql_fetch_array( $data ))
{
$id_num=$id_num + 1;
echo "<tr>
<td>".$info['date']."</td>
<td>$id_num</td>
<td>".$info['time']."</td>
<td>".$info['user']."</td>
<td>".$info['remarks']."</td>";
echo "</tr>";
}
echo "</table>";
}
?>
到目前为止,这会输出一个表格形式的报告,这不是我真正想要的。我听说过这个“团体”,但我真的需要有一个好的入门想法才能让它继续下去。