Click here to Skip to main content
15,663,225 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, bool given in C:\xampp\htdocs\kerlyMusic22\index.php on line 196

am getting an error on the while statement.

i tried to solve the problem, used stackflow

What I have tried:

$getVote = mysqli_query($connect, "SELECT * FROM tblvotes WHERE .'$dbname=dbkerly'");
					while($rowvote = mysqli_fetch_array($getVote))
                        echo $rowvote["vname"];
Updated 22-Jul-22 3:33am

1 solution

Because your query failed, the return value is a boolean FALSE. If you check the MySQL :: MySQL Documentation[^] it explains everything.
Share this answer
0x01AA 22-Jul-22 9:55am    
Learned something new with that (different return types for one and the same method, how ugly :-) ).
Richard MacCutchan 22-Jul-22 10:31am    
Someone, somewhere is having a good laugh about it.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900