我正在使用fpdf,它使用foreach循环显示多个记录,但是它说“连接忙碌处理另一个命令的结果”。
$id = $_GET['id'];
$stmts = $database->prepare("SELECT * FROM inv_dealerscardsuppliers WHERE id = :id");
$stmts->bindParam(':id',$id);
$stmts->execute();
$resultsuppliers = $stmts->fetch(PDO::FETCH_ASSOC);
foreach ($resultsuppliers as $rowsuppliers) {
$pdf->cell(w:'47.5', h:'6', txt:$rowsuppliers['major'], border:'1', ln:'0',align:'L');
$pdf->cell(w:'47.5', h:'6', txt:$rowsuppliers['brand'], border:'1', ln:'0', align:'L');
$pdf->cell(w:'47.5', h:'6', txt:$rowsuppliers['terms'], border:'1', ln:'0',align:'L');
$pdf->cell(w:'47.5', h:'6', txt:$rowsuppliers['credit'], border:'1', ln:'0',align:'L');
}
1条答案
按热度按时间w8rqjzmb1#