RE: [PEAR] [MDB] DSN syntax question
| From: | Lukas Smith | Date: | Mon, 15 Sep 2003 07:52:29 +0000 |
| Subject: | RE: [PEAR] [MDB] DSN syntax question | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-7809@lists.php.net to get a copy of this message | ||
> From: Thierry Bothorel [mailto:thierry.bo@netcourrier.com]
> Sent: Saturday, September 13, 2003 11:24 PM
> using an array, what is the good writing for port :
>
> $mdb=&MDB::connect(array
> (
> "hostspec" => "localhost",
> "port" => 110
> )
>
> or
>
> $mdb=&MDB::connect(array
> (
> "hostspec" => "localhost:110"
> )
>
> For using a socket :
>
> $mdb=&MDB::connect(array
> (
> "protocol" => "unix(/path/to/socket)"
> )
>
> or
> $mdb=&MDB::connect(array
> (
> "protocol" => "unix"
> "proto_ops" => "/path/to/socket"
> )
>
> or
>
> $mdb=&MDB::connect(array
> (
> "protocol" => "unix"
> "socket" => "/path/to/socket"
> )
Always keep the stuff seperate (hostspec, ports etc).
I just recently implemented all of these connect features into MDB 2.0.
MDB 1.x only support username, password, hostspec, port, database in the
DSN (doing this by memory, might have missed something).
MDB will support every connect scenario that DB does.
Regards,
Lukas