PHP 4 + Mysq 4l - Too many connections

From: Date: Fri, 15 Jul 2005 13:27:19 +0000
Subject: PHP 4 + Mysq 4l - Too many connections
Groups: php.windows 
Request: Send a blank email to php-windows+get-26209@lists.php.net to get a copy of this message
Hello there, What is the correct way to clean the server memory after a mysql query? I usually do this bellow: ---------------------------------------------------------- $res = mysql_query("select bla bla bla"); $row= mysql_fetch_array($res); the code ... mysql_free_result($res); #at the end ----------------------------------------------------------- Still, there are times where my IIS server just crashes saying "too many connections" The mysql_connect is on a lib that I include in every file. Should I close the connection on each end of page? If so, how? By the way, if I make a query like this kind: if(mysql_num_rows(mysql_query(bla bla bla))!=1) Do I have to dump the result? If so, how? Thanks a lot for your time, Rui Monteiro

« previous php.windows (#26209) next »