Should a single connection be opened, and all queries funneled through that before closing it (and the script itself)?
This would be my default approach unless there is a good reason for either multiple concurrent connections within your one script or the expectation of a long wait between queries (which would mean holding a connection open for no good reason). The definition of "a long wait" will depend on your situation.
🦛
In reply to Re: Best practices for closing database connections?
by hippo
in thread Best practices for closing database connections?
by Polyglot
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |