NebuJohn Posted July 25, 2013 Share Posted July 25, 2013 This is my code $array=$_POST [numbers]; $result = mysqli_query($con,"SELECT * From profile WHERE code = $array"); while($row = mysqli_fetch_array($result)) { echo $row['id']; echo "<br>"; } mysqli_close($con); But I get an error given below: Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given. Can anybody help me to get rid of this. Quote Link to comment Share on other sites More sharing options...
Solution PravinS Posted July 25, 2013 Solution Share Posted July 25, 2013 you have passed invalid SQL query to mysqli_query() which return false to mysqli_fetch_array(), so you are getting this error. you cannot pass array in SQL query, you can convert array into comma(,) separated string and can use IN clause in SQL Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.