[SOLVED]Mysql_close connection

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
Calimero
Forum Contributor
Posts: 310
Joined: Thu Jan 22, 2004 6:54 pm
Location: Milky Way

[SOLVED]Mysql_close connection

Post by Calimero »

Just a question,

will I get anything if I use mysql_close in the end.

is it good for processor - to tell him to dump results...
for security ... like, connection is still open and can bug something..

Any suggestions ...

php doc's didn't tell much - if anyone has real life expirience...

Thanks Ahead !
Last edited by Calimero on Tue Oct 05, 2004 8:36 am, edited 1 time in total.
Draco_03
Forum Regular
Posts: 577
Joined: Fri Aug 15, 2003 12:25 pm
Location: Montreal, Canada

Post by Draco_03 »

mysql_close is essential I Always close my connection after a given script.
exemple , after the user modify his information, the connection close.
User avatar
JAM
DevNet Resident
Posts: 2101
Joined: Fri Aug 08, 2003 6:53 pm
Location: Sweden
Contact:

Post by JAM »

Draco_03 wrote:mysql_close is essential
Not essential, but "A Good Thing (tm)".

The link is closed after the script is executed/ended, but as the scripts grow bigger and more complicated, executing a mysql_close at certain points is useful.

This also reflects on what kind of hardware the server is using, amount of visitos/time-interval etc etc. Personally, I do use it.
Post Reply