0

I'm trying to retrieve some data from a database table but I'm getting this error

Uncaught TypeError: mysqli_fetch_array(): Argument #1 ($result) must be of type mysqli_result, bool given in

The following is my code. The error is on line 3. How to solve this error?

  $config="SELECT * FROM configurations";
  $query2=mysqli_query($dbCon, $config);
  while($row2=mysqli_fetch_array($query2)){
    $school_name=$row2["name"];
    $address1=$row2["address1"];
    $address2=$row2["address2"]; 
  }
James Z
  • 12,104
  • 10
  • 27
  • 43
Like
  • 1
  • 1

0 Answers0