Possible Duplicate:
PHP: Warning: sort() expects parameter 1 to be array, resource given
I get this error:
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in
$sql = dbquery("SELECT * FROM `channels` WHERE `cat_slug` = ".$cat." ");
while($row = mysql_fetch_array($sql)){
$category = $row["cat_name"];
$slug = $row["cat_slug"];
// other
}
and $cat can be for example "funny"
how can i change the code to get it done?