Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, string given in C:\....... on line 42
Hi guys,
I have this warning but I have not found what causes this error, please guys can you light me?
The error is in line 42 ---> while($row = mysqli_fetch_assoc($result)) {
Something is wrong in your query so the $result fariable is 'false' instead of a mysqli_result... Let me take a closer look
Marco Gasi
Try to get the error:
$sql = "SELECT * FROM documentos WHERE documentos.key = '$clavenum' or nombre = '$snombre' ORDER BY fecha DESC, hora DESC";$result = mysqli_query($conn, $sql);if (!$result){ echo("Error description: " . mysqli_error($con));}else{...
I tried but displays the same error only on line 42
$sql = "SELECT * FROM documentos WHERE documentos.key = '$clavenum' or nombre = '$snombre' ORDER BY fecha DESC, hora DESC";
$result = mysqli_query($conn, $sql);
if (!$result)
{
echo("Error description: " . mysqli_error($con));