instantiating a database object?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

I have created a simple Database class the connects to a MySQL database
server, and selects the appropriate database.

What is the best way to implement this class? I want to avoid having
instantiate a new Database object every time I execute a query, is this
possible? If I used static members and methods would a connection
(mysql_connect) be called every time? Could I possible store the open
connection in memory and allow it to be accessed by all the users
visiting the site?

Any thoughts are appreciated. TIA.


Site Timeline