[Melbourne-pm] DBI connect()'s, scope and disconnects
lsharpe at pacificwireless.com.au
Thu Jul 26 21:14:10 PDT 2007
Can someone clear up a couple of things for me here?
I have some code which does something like this:
# Do some other stuff here.
last if (some_condition == true);
Question is, if some_condition is true, the loop ends and $dbh goes out
of scope. Does disconnect() get called on $dbh automatically? Or do I
have a database connection still, even though I can't actually use it?
This could cause grief for the database server if stale connections are
still hanging around.
On a related note, does disconnect() get called automatically when a
program ends? Even if not explicitly called?
Network Systems Engineer
Ph +61 3 9584 8966
Mob 0408 009 502
Helpdesk 1300 300 616
email lsharpe at pacificwireless.com.au
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Melbourne-pm