Hi
if I don't use persistent connections is it better to close a mysql database connection as soon as I am done with it and then reopen/close it later in the script when I need to access it again?
For example I have an entry page where I do a lookup for an existing record right at the beginning. The user then spends some time filling out the form and when he/she hits submit it either inserts a new record or updates an exisiting one.
So should I connect to the DB only right at the beginning and then leave it open until the insert/update occurs or would it be better to close it right after the lookup and then connect again to just do the insert/update?
Thanks in advance for your thoughts
Serge