This question already has an answer here:
I am facing problem in this query.
$sql5="SELECT SUM(VAL) AS likes FROM like WHERE QNO='$question' AND CNO='$category'";
$result5=mysqli_query($db,$sql5) ;
$likes = mysqli_fetch_array($result5); //line140
I is giving me the following warning
Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in C:\xampp1\htdocs\forum\question.php on line 140
i have tried everything, and nothing is working.
My Question is not duplicate as i have looked thoroughly in stackexchange.com too with no avail.
It gives the following error on doing mysqli_error($db);
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'like WHERE QNO='' AND CNO=''' at line 1
mysqli_error($db)
to see the error message. – Barmar Jan 2 at 4:31like
– Minh Quý Jan 2 at 4:31