On Fri, March 31, 2006 2:30 pm, Martin Zvarík wrote: > I was wondering why is it necessary to use mysql_close() at the > end > of your script. > If you don't do it, it works anyways, doesn't it? Yes, but... Suppose you write a script to read data from one MySQL server, and then insert it into 200 other MySQL servers, as a sort of home-brew replication (which would be really dumb to do, mind you)... In that case, you REALLY don't want the overhead of all 200 connections open, so after you finish each one, you would close it. There are also cases where you finish your MySQL work, but have a TON of other stuff to do in the script, which will not require MySQL. Close the connection to free up the resource, like a good little boy. :-) There also COULD be cases where your PHP script is not ending properly, and you'd be better off to mysql_close() yourself. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php