php include not working in custom page

WordPress has its own connection class, which can be used trough the $wpdb object.

Is there a particular reason to use direct queries to the db, instead the wordpress functions (get_posts, get_post_meta, get_option)? Keep in mind that by doing this, you loose a lot of the wordpress tools, such as cache, filters, etc…