Forum Moderators: coopster
This might be a dumb question, but:
How important is it to close a DB connection?
I accidentally forgot to do it in some pages and did in others, does this matter?
Which leads to another thing, I've read tutorials/examples which close it like this:
mysql_close();
whilst others use the connection string
mysql_close($connection);.
Which is better/does it matter?
Thanks in advance
Again pardon my ignorance, but I have a limited knowledge of this..
mysql_close($connection) closes the specific connection. I believe mysql_close() closes the last connection used?
Either way, you should only have one connection per script so the problem shouldn't arise.
:)