note 75039 rejected from function.mysqli-connect by nlopess
| From: | nlopess@php.net | Date: | Sat, 12 May 2007 11:30:33 +0000 |
| Subject: | note 75039 rejected from function.mysqli-connect by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-126449@lists.php.net to get a copy of this message | ||
Note Submitter: basstradamus at gmail dot com
----
Hi,
I try to connect to MySQL server using mysqli (
ex. $link = new mysqli('noname.up', $userName, $password, $dbName,
$port);) that doesn't exist and script hang for 30 sec.
How can I chceck database server avability? I don't want to hang scripts for more than 3 sec.
$link = new mysqli($host, $userName, $password, $dbName,
$port);