When is it the best time to close a database connect? Is it good to close it on every scripting page i do that uses it?
Jump to Post
When a PHP script is done executing all non-persistent connections will be closed.
Non-persistent connections are made with the _connect database functions so as long as you stick to that, there's nothing to worry about.
All 7 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.