hi folks,
i m new in php. so far i m doing good but now i get the error Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in xxxxxx
i seriously hate this error. i can't find any help on why this error come but here is my code
Code PHP:
function get_heads($cat_id){
    $query = mysql_query("select * from categories where menu_name = {$cat_id}");
/*    if($result = mysql_fetch_array($query)){
        return $result;
        return null;
            die (mysql_error());
        echo "$result";
first i thought i was doing the if statement wrong but now i tried the while and even then i have issues. help pls