Let's say that I have a webbpage that holds 3 or 4 "functions" that each needs a database connection.
How do I get the best performance if we say that the page has several users at the same time?:
Open db at top of page and query for each "function" then close at bottom.
Open and close db for each "function" whenever the connection is needed (3 or 4 times).
I guees this depends on several things but what is the most common thing to do?
//mattis