Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » PHP
  • » [PHP-DEV] Is it necessary to have different DSN formats in PDO ? [RSS Feed]

#1 Nov. 2, 2005 14:50:41

Andrey N.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PHP-DEV] Is it necessary to have different DSN formats in PDO ?


What we have now is...

"mssql:host=localhost;dbname=testdb"
"sybase:host=localhost;dbname=testdb"
"dblib:host=localhost;dbname=testdb"
"mysql:host=localhost;dbname=testdb"

"pgsql:host=localhost port=5432 dbname=testdb user=bruce password=mypass"
"oci:dbname=//localhost:1521/mydb"
"firebird:User=john;Password=mypass;Database=DATABASE.GDE;DataSource=localhost;Port=3050"
"sqlite:/opt/databases/mydb.sq3"

Maybe it's better to make it more standart ?
Like:
"driver:host=localhost; port=1234; user=bruce; password=mypass; dbname=testdb"
"driver:file=/path/to/sql.socket; user=bruce; password=mypass; dbname=testdb"

It's much easer to write, parse and generate. Only don't know what to do with
ODBC:

"odbc:Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\\db.mdb;Uid=Admin"
"odbc:DSN={IBM DB2
ODBC};HOSTNAME=localhost;PORT=50000;DBNAME=SAMPLE;PROTOCOL=TCPIP;UID=db2inst1;PWD=ibmdb2;"

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:http://www.php.net/unsub.php

Offline

#2 Nov. 2, 2005 15:02:17

Wez F.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PHP-DEV] Is it necessary to have different DSN formats in PDO ?


That's one of the reasons why we don't do it.

--Wez.

On 11/2/05, Andrey Nikolaev <> wrote:
> It's much easer to write, parse and generate. Only don't know what to do
> with ODBC:
>
> "odbc:Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\\db.mdb;Uid=Admin"
> "odbc:DSN={IBM DB2
> ODBC};HOSTNAME=localhost;PORT=50000;DBNAME=SAMPLE;PROTOCOL=TCPIP;UID=db2inst1;PWD=ibmdb2;"

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:http://www.php.net/unsub.php

Offline

  • Root
  • » PHP
  • » [PHP-DEV] Is it necessary to have different DSN formats in PDO ? [RSS Feed]

Board footer

Moderator control

Enjoy the 20th of November
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support