0
<?php
include"conectar.php";
$query="select cpf from teste where cpf = '" . $cpf . "' order by teste";
$stmt=mysqli_query($con,$query);
if($stmt) {
$today = date("d.m.y");
} else {
mysqli_rollback($con);
echo "Transaction rolled back.<br />";
}
while($row=mysqli_fetch_array($stmt) )
{
$cpf = $row['cpf'];
}
mysqli_close($con);
?>
the error is as follows....
Transaction rolled back.
Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given
Remembering the result is ok! But accuses this error! Thank you!
You read the warning message?
– Jefferson Quesado
I don’t understand Jefferson, it might be a little clearer?
– Flavio Cordas
Yes, I can: you saw what you have after "Warning: " until the end of the line?
– Jefferson Quesado
Warning: mysqli_fetch_array() expects Parameter 1 to be mysqli_result, Boolean Given in......while($Row=mysqli_fetch_array($stmt) ) ː $name = $Row['name']; }
– Flavio Cordas
And that warning means what?
– Jefferson Quesado
Tip: You seem to be sorting by table name instead of sorting by column name.
– Woss
Thanks Anderson solved the problem!
– Flavio Cordas
I am voting to close this question as out of scope because the problem has been solved without answers.
– Sam