$sql = "SELECT * FROM item_tb WHERE warranty_id = $war_id;";
$result = mysqli_query($db, $sql);
$count = 1;
while ($row_it = mysqli_fetch_array($result)) {
$pdf->Cell(14, 10, $count, 1, 0);
$pdf->Cell(58, 10, $row_it['item_name'], 1, 0);
$pdf->Cell(58, 10, $row_it['serial_number'], 1, 0);
$pdf->Cell(25, 10, $row_it['warranty_duration'] . ' bulan', 1, 0, 'C');
$pdf->Cell(35, 10, date("d-m-Y", strtotime($row_it['expired_warranty'])), 1, 1, 'C');
$count++;
}
这是我当前的输出代码,如果项目名称很短,它可以很好地工作,但如果项目名称很长,名称的某些部分将进入串行列。
喵喵时光机
MMMHUHU