0

The error I get:

Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, boolean given in /home/test.php on line 130

All paragraph around line 130:

function loadArrayFromQuery($query) {
    $result = $this->executeQuery($query);
    $return = array();
    while ($rows = mysqli_fetch_assoc($result)) {
        $return[] = $rows;
    }
    return $return;
  }
}

I don't have a clue where I've gone wrong. I tried to solve this in every way possible.

Funk Forty Niner
  • 74,372
  • 15
  • 66
  • 132

1 Answers1

2

Make sure your query is a valid SQL query. $this->executeQuery($query) returns false if the query passed is invalid. And mysqli_fetch_assoc doesn't accept boolean value.

kabirbaidhya
  • 2,944
  • 2
  • 33
  • 52