0
I’m having trouble with this page right below.
My difficulty is in displaying the products of a specific invoice. Because in statment SELECT * FROM produtos WHERE = ?
does not return anything! But when I put the number physically (SELECT * FROM produtos WHERE = 4519
) he displays normally!
Here’s the code:
<code>
include 'banco.php';
$nota = $_GET['nota'];
$pdoo = Banco::conectar();
$sqll = "SELECT * FROM produtos where numnota = ?";
$qq = $pdoo->prepare($sqll);
$qq->execute(array($nota));
$dataa = $qq->fetch(PDO::FETCH_ASSOC);
print_r($dataa);
foreach ($pdoo->query($sqll)as $row) {
echo '<tr>';
echo '<td>'.$row['descricao'].'</td>';
echo '<td>'.$row['unidade'].'</td>';
echo '<td>'.number_format($row['qtde'],"2",",",".").'</td>';
echo '<td>R$ '.number_format($row['valunit'],"2",",",".").'</td>';
echo '<td>R$ '.number_format($row['desconto'],"2",",",".").'</td>';
echo '<td>R$ '.number_format($row['total'],"2",",",".").'</td>';
echo '</tr>';
}
Banco::desconectar();
</code>
You need to demonstrate the problem in the question itself (please [Edit]), instead of posting code links. See I can only show a link to my website with problems? and the tips on minimum example.
– Barbetta
Thank you for your attention
– LuDi Carvalho