PHP连接PGSQL

WBOY
WBOYOriginal
2016-06-23 14:34:491918browse

function conn($hostName,$Login,$Password,$dbName,$Port) //建立目标数据库连接{    $conn = &ADONewConnection('postgres8');    $conn->debug = false; //true时adodb将在页面显示debug信息    $conn->LogSQL(false); //true时adodb将建立adodb_sqllog表记录每次sql操作    $conn->Connect($hostName,$Login,$Password,$dbName,$Port);     //$conn->Connect("localhost","olebarowner","olebar",'hn_db');           $conn->SetFetchMode(ADODB_FETCH_ASSOC);    return $conn;}

PHP连接PGSql的方法

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:php调用c++Next article:ajax+php分页