Forum Moderators: coopster

Message Too Old, No Replies

Whats at risk with ignoring mysql!

Handling memory and connections

         

HeadBut

2:08 pm on Sep 22, 2004 (gmt 0)

10+ Year Member



Not using:

mysql_free_result($result);
mysql_close($link);

What kind of problems is this going to cause me? Everything seems ok!
Have I forgotten something else?
Can I just put some of these in my footer.inc and the problems will go away?

Thanks
Careless Coder!

coopster

4:07 pm on Sep 22, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



You'll probably be fine if you don't free resources [php.net], but who's to say? I find it good programming practice to close links and free resources (when necessary).

jollymcfats

5:12 pm on Sep 22, 2004 (gmt 0)

10+ Year Member



PHP will auto-free & close mysql resources after each request. If you don't get much traffic, it doesn't matter.

When you get enough traffic that you start to be worried about the number of pages per second you can serve, you'll want all of your MySQL resource usage & cleanup to be as tight as possible.