設法得到它的工作,過了好一會兒壽
<?php
$curr_userno = $logtime->valueof('user_number');
$tot_mins = 0;
while (!$logtime->eof()) {
while (!$timestamp->eof()) {
if ($curr_userno != $logtime->valueof('user_number')) {
$total_time = floor($tot_mins/60) . " hours " . ($tot_mins % 60)." minutes"
?>
<tr>
<td></td>
<td></td>
<td align="right"><b>Total =</b></td>
<td colspan="8"><b><?php echo $total_time; ?></b></td>
<td></td>
<td></td>
</tr>
<?php
$curr_userno = $logtime->valueof('user_number');
$tot_mins = 0;
}
$tot_mins = ($tot_mins + $logtime->valueof('diff') * 60) + $timestamp->valueof('difference');
?>
<tr>
<td>
<?php
while (!$users->eof()) {
if ($users->valueof('userno') == $logtime->valueof('user_number')) {
echo $users->valueof('auth_name') . ' ' . $users->valueof('auth_surname');
$users->first();
break;
}
$users->next();
}
?>
</td>
<td><?php echo $logtime->valueof('start_time') ?></td>
<td><?php echo $logtime->valueof('end_time') ?></td>
<td><?php echo $logtime->valueof('diff') . " " . "hours" . " " . $timestamp->valueof('difference') . " " . "minutes"; ?></td>
<td>
<?php
while (!$profiles->eof()) {
if ($profiles->valueof('profile_id') == $logtime->valueof('profile_id')) {
echo $profiles->valueof('profile_name');
$profiles->first();
break;
}
$profiles->next();
}
?>
</td>
<td><?php echo $logtime->valueof('description') ?></td>
</tr>
<?php
$timestamp->next();
$logtime->next();
}
echo "<hr></hr>";
}
$total_time = floor($tot_mins/60) . " hours " . ($tot_mins % 60)." minutes";
?>
<tr>
<td> </td>
<td></td>
<td align="right"><b>Total =</b></td>
<td colspan="8"><b><?php echo $total_time; ?></b></td>
<td></td>
<td></td>
</tr>
<?php
?>
<tr>
<td colspan="8"><hr></hr></td>
</tr>
</table>
的代碼後,我的我用初始後得到它的工作
您能不能給預期的輸出? –