Implementation of a Custom Database Class
Returning Early / Guard Clauses

Returning early is very easy to do and can severely improve your code. 

Looking at findUserByMobile, it is nearly impossible to say which else closes which if on first glance. In this case it doesn't matter that much as all else do the same thing, but it is still not nice to read. 

If you just invert the if and return, the code is a lot nicer:

 public function findUserByMobile($mobile) {
    $db = new Database();
    if (!$db-&gt;connect()) {
        return false;
    }

    $query = "SELECT * FROM users WHERE mobile = ?";    
    if (!$db-&gt;prepare($query)) {
        return false;
    }

    $sql_str = "s";
    if (!$db-&gt;set_params($sql_str, $mobile) ){
        return false;
    }

    $ret = $db-&gt;exec_query_array();
    if (!$ret) {
        return false;
    }
    return $ret;
}


If you don't care what went wrong, you could also combine some of the ifs. In practice, you probably do care though.

Error Handling

Just returning false on error can make debugging quite difficult. Did the query fail because you couldn't connect to the database? Because the query is wrong? Because the parameter is wrong? Because no result could be found? We just don't know. Think about throwing exceptions instead.

Database connections

You really do not want to create a new database connection for each query. Instead, pass the database object to the method and reuse it.

Misc


connect sounds like it would connect something. Instead, it returns something. It is customary to name the method isConnected.
don't shorten variable names. ret is more difficult to read than return or result, metadata is better than md, etc.
always use curly brackets, even for one-line statements.