using mysql_close()
-
is it necessary to use mysql_close() at the end of a query in PHP?
-
Answer:
In the http://php.net/manual/en/function.mysql-close.php : mysql_close() closes the non-persistent connection to the MySQL server that's associated with the specified link identifier. Using mysql_close() isn't usually necessary, as non-persistent open links are automatically closed at the end of the script's execution. More reading about that http://www.php.net/manual/en/language.types.resource.php#language.types.resource.self-destruct
phpFreak at Stack Overflow Visit the source
Other answers
Using mysql_close() isn't usually necessary, as non-persistent open links are automatically closed at the end of the script's execution. See also freeing resources. read more at : http://php.net/manual/en/function.mysql-close.php
Haim Evgi
As answered by others and the manual, it's not necessary. But if you wonder the use; you usually only want to do this when there is more to come in the PHP script and you want to ensure that another connection/transaction is to be used then.
BalusC
No. When the PHP requests ends all resources will be freed, including MySQL connection resources.
CodeAddict
Related Q & A:
- Where To Buy Ukash Using Paypal?Best solution by ukashexchange.net
- How To Increase Speed Using Modem?Best solution by ehow.com
- How To Build Business Directory Using Php Mysql?Best solution by Stack Overflow
- Is using `int` more preferable than using `unsigned int`?Best solution by Stack Overflow
- Why can I download attachments using Yahoo Classic Mail, but not using newer Yahoo Mail?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.