RE: [PEAR] MDB test connection
| From: | Lukas Smith | Date: | Fri, 17 Oct 2003 20:08:34 +0000 |
| Subject: | RE: [PEAR] MDB test connection | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-8483@lists.php.net to get a copy of this message | ||
> From: Fabrizio Balliano [mailto:fabrizio.balliano@crealabs.it]
> Sent: Friday, October 17, 2003 7:51 PM
> how can I test effectively the database connection with MDB?
>
> The documentation says that the real connection is done only on first
> query...
you can manually call the connect() method.
If you pass a database name in the dsn this is done automatically.
However for databases like mysql the database is not selected until you
actually run a query.
But this way you can check if the connection to the database server
itself is working.
Regards,
Lukas