Connecting to database everytime You make an instance
View Single Post
06-13-2010, 11:26 PM
is cute and cuddly
Join Date: Mar 2008
Location: Vegas, Baby
Can you elaborate on 'using this class many times'? Are you using it many times in a single page view, or just many times across the site as a whole?
If you are calling the class numerous times inside of what would be a single page view, then you may benefit from creating a singleton instance of the database class. This would avoid connecting to the database more than once per page view. If you are simply calling the class once on various pages of the site, then I wouldn't worry about it at all. Most applications create a new connection on every page load.
View Public Profile
Send a private message to delayedinsanity
Visit delayedinsanity's homepage!
Find More Posts by delayedinsanity