これは今週の私の2番目の質問です(これまでのところ)。私の最初のものは成功した解決策を達成したので、これも幸運になるかもしれないと思いました。クエリが出力したリターンを次のようにレイアウト/設計したいと思います。
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>";
}
?>
これまでのところ、これは私が本当に望んでいるものではない表形式のレポートを出力します。私はこの「グループ」を聞いたことがありますが、それを実行するには、優れたスターターアイデアが本当に必要です。