Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in /home/myritebook/public_html/footer.php on line 13
I am trying to fix the above error.
Please Help.
code is given below:
<?php
include 'db.php';
if ($conn) {
echo "Database Found ";
}
else {
die("Database connection failed");
}
$find_count=mysqli_query($conn,"SELECT * FROM count_number");
while($row=mysqli_fetch_array($find_count));
{
$current_count=$row['count'];
$new_count=$current_count+1;
try{
$sql= "UPDATE count_number SET count = '$new_count' where id=1";
$update_count=mysqli_query ($conn,$sql);
}
catch(Exception $e){
echo 'error;'.$e->getMessage();
}
}
?>