Let's say I call multiple functions on a given page.
function getProfile {
<mysql code to connect>
...
...
}
function getMatchingUsers {
<mysql code to connect>
...
...
}
If I call the two functions above on a given page, wouldn't that open multiple connections to the DB? I assume php would automatically close the DB connection after the first function runs, but then it would automatically open another connection for the second function. My question is, what if my page makes a bunch of calls to the DB. Is this good for memory, io, etc...?