0
Good afternoon, I’m trying to query an entire value in my BD and save it in a variable, I tried this way:
$procuraPreco = mysqli_query($connect, "SELECT preco FROM infs WHERE seis='$seis' and bin='$bin' and quantidade='$qndtd'");
print_r($retornaPreco = mysqli_fetch_all($procuraPreco,MYSQLI_ASSOC));
The array is returning empty. I know it might be a possible duplicate but I’ve tried a lot of ways and I couldn’t
Printa sua sql, to see if the variables are filled in correctly. Pq the name of this variable
$qndtd
is a little strange, sometimes it was meant to be$qntd
and you made a mistake– Pedro Augusto
Printa the query and test to see if you have feedback from it, if possible add the sql structure and the echo of the query so we can test.
– Darlei Fernando Zillmer
I got it. It was a variable error anyway, thank you.
– PLINIO RODRIGUES