69GIAP / 69GIAPBosWar

1 stars 1 forks source link

Every db connection should be closed when done. #7

Open 69giaptushka opened 11 years ago

69giaptushka commented 11 years ago

Each instance of

Incorporate the MySQL connection script.

require ( '../connect_db.php' );

Should eventually be followed by:

Cose the connection

mysqli_close($dbc);

once there is no longer a need for that particular connection.

There are two reasons for this. The first is the obvious one that we don't want to leave a bunch of open connections hanging out there. The second is that apparently it is less 'expensive' to open and close a connection than to reuse one.

Please check that each connect is followed by a close.

69giapmyata commented 11 years ago

I agree and partly I already did it. There is also a way to empty variables which could be handy somtimes.

69giapmyata commented 11 years ago

I saw you working through all available files and adding this. I guess we can close this issue now.

69giaptushka commented 11 years ago

I keep finding new examples. :)