Every now and then my site comes up with an error saying there is too many connections to the database.
My code is setup so when I need something it connects to the database, selects the table, does what it needs to, then closes the database connection.
It does not happen very often but I have seen it from time to time.
Is this from me opening and closing so much? should I have it opened all the time? or should I have and include file that has all the database connection information?
Just looking for some advise.
Thanks