1
I have this consultation:
while($rows_cursos = mysqli_fetch_array($resultado_cursos)) {
$tabela1 .= '<tr>';
$tabela1 .= '<td style="font-size: 12px">'.$rows_cursos['DataAprovacao'].'</td>';
$tabela1 .= '<td style="font-size: 12px">'.$rows_cursos['IdTipoProduto'].'</td>';
$tabela1 .= '<td style="font-size: 12px">'.$rows_cursos['IdProduto'].'</td>';
$tabela1 .= '<td style="font-size: 12px"> '.$rows_cursos['Quantidade'].'</td>';
$tabela1 .= '<td style="font-size: 12px"> '.$rows_cursos['IdRequerente'].'</td>';
$tabela1 .= '<td style="font-size: 12px"> '.$rows_cursos['IdDestino'].'</td>';
$tabela1 .= '<td style="font-size: 12px"> '.$rows_cursos['Estado'].'</td>';
$tabela1 .= '<td> <select data-qtd3="Fornecedor" style="width:106px" name="Fornecedor[]" id="Fornecedor">
<option></option>
<?php
$sql = "SELECT * FROM Fornecedor ORDER BY Fornecedor ASC";
$qr = mysqli_query($conn, $sql);
while($ln = mysqli_fetch_assoc($qr)){
echo '<option value="'.$ln['Id'].'">'.$ln['Fornecedor'].'</option>';
}
?>
</select></td>';
$tabela1 .= '</tr>';
}
Only if you select it
$tabela1 .= '<td> <select data-qtd3="Fornecedor" style="width:106px" name="Fornecedor[]" id="Fornecedor">
<option></option>
<?php
$sql = "SELECT * FROM Fornecedor ORDER BY Fornecedor ASC";
$qr = mysqli_query($conn, $sql);
while($ln = mysqli_fetch_assoc($qr)){
echo '<option value="'.$ln['Id'].'">'.$ln['Fornecedor'].'</option>';
}
?>
</select></td>';
not working. Does not return data from vendors I have in the database table
"Does not show the types of vendor I have in the database table", what exactly does that mean? It doesn’t return the data?
– Ricardo Pontual
@Ricardo Pontual, yes I already edited the question
– Bruno