mysql_fetch_array() expects parameter 1 to be resource, null given

hi, i am getting a error and i can’t find anything related to it on net. what i m doing is inserting a value manually and then displaying it to show. it works fine till insert but when it gives me error on mysql_fetch_array(). here is my code

$sql = "SELECT * FROM users WHERE id=1";
$result_set = $database->Query($sql);
$found_user = mysql_fetch_array($result_set);
echo $found_user['username'];
public function Query($sql){
        mysql_query($sql,$this->con);
    }
}
public function OpenConnection(){
    $this->con = mysql_connect(DB_server,DB_username,DB_password);
        if(!$this->con){
            die ("Cannot connect to database because " .mysql_error());
        }
    }

where am i going wrong?
there error i get is
mysql_fetch_array() expects parameter 1 to be resource, null given

That is generally an indicator that the query has failed. However, in your case it looks like it is because the Query function is not returning result of calling mysql_query. Simply, add return before mysql_query and that should fix the problem (unless the query is incorrect).

it worked! thanks, i m new to OOP

Nothing to do with OOP – functions 101.

yes i know. i m just little confused/out of pratice with return function