Forum Moderators: open
I'm new to PHP and MySQL so this is probably an easy question. But how often should I open/close the connection on a web page.
For example, let's say on a particular web page I run 3 database queries. Should I open/close the database connection for EACH query. Or should I have a open connection at the begnning of the first query and a close connection at the end of the last query?
Thanks.
Jim
The reason you don't want to do it a bunch of times is because it taxes resources opening/closing the object numerous times.