Forum Moderators: coopster
I have a connection to mysql as
$ndb = mysql_connect($host,$dbuser,$dbpass, TRUE) or die ("Database Connection Error<br>");
There are many php function tah can be take many time, so after this I check if connection is live with
if (!$ndb)
..
reconect code
..
Problem is that $ndb is always TRUE also when is timeout (by wait_timeout on my.cnf)
So, how check if connection is live and not timeout ?
Thanks