Look for integer value in DB

0

Good afternoon, I'm trying to query an integer value in my DB and save it to 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 have already tried it in many ways and I could not

    
asked by anonymous 24.08.2018 / 21:02

1 answer

-1

I think it might be your query using php variables. It would look like this:

$ searchPreco = mysqli_query ($ connect, "SELECT price FROM infs WHERE six = '" $ six. "' and bin = '. $ bin."' and quantity = '". $ qndtd. "); print_r ($ returnPreco = mysqli_fetch_all ($ searchPreco, MYSQLI_ASSOC));

    
24.08.2018 / 21:15