Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
PHP: PostgreSQL 関数 (PDO_PGSQL) - Manual
[go: Go Back, main page]

PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net

search for in the

PDO_PGSQL DSN" width="11" height="7"/> <pg_version
Last updated: Wed, 01 Nov 2006
view this page in

CXXIII. PostgreSQL 関数 (PDO_PGSQL)

導入

PDO_PGSQL は、PHP から PostgreSQL データベースへのアクセスを可能にするための PHP Data Objects (PDO) インターフェース を実装したドライバです。

目次
PDO_PGSQL DSN -- PostgreSQL データベースに接続する
PDO::pgsqlLOBCreate -- 新しいラージオブジェクトを作成する
PDO::pgsqlLOBOpen -- 既存のラージオブジェクトのストリームをオープンする
PDO::pgsqlLOBUnlink -- ラージオブジェクトを削除する


add a note add a note User Contributed Notes
PostgreSQL 関数 (PDO_PGSQL)
amiller at php dot net
15-Jan-2007 05:12
If you want to use "Aliasing" in your code, that is to define the DSN string in the php.ini file as described in the documentation for the constructor object for PDO itself (ex.)

try {
   $dbh = new PDO("foo");
} catch(PDOException $e) {
   echo $e->getMessage();
}

for the Aliasing to work, the DSN MUST be defined in the following way, following the syntax exactly... that is with double quotes, the equal sign, etc. I dinked around with this for quite some time before I figured this out. Again, that is no space between the dsn alias and the equals sign, no space after the equals sign, double quotes around the DSN, not single quotes, and spaces in between the attributes, not semicolons. I am not sure about whether you must also designate all the connection attributes show here or not but this is what ultimately worked for me.

pdo.dsn.foo="pgsql:host=localhost port=5432 dbname=foodb user=foouser password=foopassword"

PDO_PGSQL DSN" width="11" height="7"/> <pg_version
Last updated: Wed, 01 Nov 2006
 
 
show source | credits | sitemap | contact | advertising | mirror sites