View Single Post
Old 06-13-2010, 11:26 PM   #4 (permalink)
delayedinsanity
is cute and cuddly
 
delayedinsanity's Avatar
 
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
delayedinsanity is on a distinguished road
Default

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.
delayedinsanity is offline  
Reply With Quote