HoraShadow
Jul 28th, 2006, 03:57 AM
Hello guys,
I inherited a PHP application. In the db layer of the application, it has this function to connect to a mySql db.
function getConn() {
return mysql_connect('localhost', 'root', '') or die('Could not connect: ' . mysql_error());
}
This function gets called at the beginning of every db function in the dblayer class.
Beeing new to PHP, I do not know if this is handled well. There's no connection closing on PHP? or it's handled automatically by a connection pool that times out?
Thanks
HoraShadow
I inherited a PHP application. In the db layer of the application, it has this function to connect to a mySql db.
function getConn() {
return mysql_connect('localhost', 'root', '') or die('Could not connect: ' . mysql_error());
}
This function gets called at the beginning of every db function in the dblayer class.
Beeing new to PHP, I do not know if this is handled well. There's no connection closing on PHP? or it's handled automatically by a connection pool that times out?
Thanks
HoraShadow