$sql = "SELECT 'id', 'nome', 'nivel' FROM 'usuarios' WHERE ('usuario' = '".$usuario ."') AND ('senha' = '". sha1($senha) ."') AND ('ativo' = 1) LIMIT 1"; $result = mysqli_query($conn, $sql); if (mysqli_num_rows($result) != 1) { echo "Login inválido!"; exit; } else { // }
Error:
Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in