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"];
}