#where you are running mysqli_query , add 'or die( mysqli_error($db)'
#e.g
$sql = "SELECT * FROM users";
$result = mysqli_query($db, $sql) or die( mysqli_error($db));
#$db being the variable holding the connection to db
mysqli_fetch_array($result)
mysqli_fetch_array($query)
For me, there was an error in my SQL query that was giving me this error. Check if the query that you are running works in your database management system!