Possible Duplicate:
mysql_fetch_array() expects parameter 1 to be resource, boolean given in select
I have the following php code
<?php
mysql_connect("localhost","admin","***");
mysql_select_db("DbName");
$sql=mysql_query("select * from `menu`");
while($row=mysql_fetch_assoc($sql))
$output[]=$row;
print(json_encode($output));
mysql_close();
?>
This code didn't work after I changed my database's encoding to UTF8-general_ci. What do I have to do in order to work my php code with my new database encoding?
It returns me the message:
Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in