i just want to know what is safer when developing a site, opening and closing a connection to a database only when it is needed or leaving the connection open for the duration of the usage to improve the speed of the site. if it is better to open and close the database connection all the time is safe to put the code into a include page as an object that can be created everytime the connection is used, with methods to open and close the connection?