note 28244 deleted from function.mysql-ping by didou
| From: | didou@php.net | Date: | Tue, 16 Mar 2004 09:34:09 +0000 |
| Subject: | note 28244 deleted from function.mysql-ping by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-66894@lists.php.net to get a copy of this message | ||
Note Submitter: admin@lunar.ath.cx
----
In relation to the above comment about checking if a mysql server is online: the call to
mysql_connect() should fail if the server you're attempting to connect to is not accessible; a
call to mysql_ping() is unneccesary in this context.
The true value of mysql_ping() is when your script has already opened a valid connection and is in
the middle of a lengthy operation. If your calls start to fail, you can call mysql_ping() to check
and reestablish the connection if need be.