位置: 编程技术 - 正文

PHP:pg_pconnect()的用法_PostgreSQL函数(php-cp)

编辑:rootadmin
pg_pconnect

推荐整理分享PHP:pg_pconnect()的用法_PostgreSQL函数(php-cp),希望有所帮助,仅作参考,欢迎阅读内容。

文章相关热门搜索词:php pg,php pcntl_fork,php -i,php pg,php ipam,php-cp,php-cp,php-cp,内容如对您有帮助,希望把文章链接给更多的朋友!

(PHP 4, PHP 5)

pg_pconnect — 打开一个持久的 PostgreSQL 连接

说明 resource pg_pconnect ( string $connection_string [, int $connect_type ] )

pg_pconnect() 打开一个到 PostgreSQL 数据库的持久连接。返回其它 PostgreSQL 函数所需要的连接资源号。

If a second call is made to pg_pconnect() with the same connection_string as an existing connection, the existing connection will be returned unless you pass PGSQL_CONNECT_FORCE_NEW as connect_type.

要打开持久连接功能,php.ini 中的 pgsql.allow_persistent 参数必须为 "On"(也是默认值)。最大持久连接数目由 php.ini 中的 pgsql.max_persistent参数定义(默认为 -1 表示没有限制)。所有连接的数目可由 php.ini 中的 pgsql.max_links 参数设置。

pg_close() 不能关闭由 pg_pconnect() 打开的持久连接。

参数 PHP:pg_pconnect()的用法_PostgreSQL函数(php-cp)

connection_string

The connection_string can be empty to use all default parameters, or it can contain one or more parameter settings separated by whitespace. Each parameter setting is in the form keyword = value. Spaces around the equal sign are optional. To write an empty value or a value containing spaces, surround it with single quotes, e.g., keyword = &#;a value&#;. Single quotes and backslashes within the value must be escaped with a backslash, i.e., &#; and .

The currently recognized parameter keywords are: host, hostaddr, port, dbname, user, password, connect_timeout, options, tty (ignored), sslmode, requiressl (deprecated in favor of sslmode), and service. Which of these arguments exist depends on your PostgreSQL version.

connect_type

If PGSQL_CONNECT_FORCE_NEW is passed, then a new connection is created, even if the connection_string is identical to an existing connection.

返回值

PostgreSQL connection resource on success, FALSE on failure.

范例

Example #1 Using pg_pconnect()

<?php$dbconn=pg_pconnect("dbname=mary");//connecttoadatabasenamed"mary"$dbconn2=pg_pconnect("host=localhostport=dbname=mary");//connecttoadatabasenamed"mary"on"localhost"atport""$dbconn3=pg_pconnect("host=sheepport=dbname=maryuser=lambpassword=foo");//connecttoadatabasenamed"mary"onthehost"sheep"withausernameandpassword$conn_string="host=sheepport=dbname=testuser=lambpassword=bar";$dbconn4=pg_pconnect($conn_string);//connecttoadatabasenamed"test"onthehost"sheep"withausernameandpassword?>

参见

pg_connect() - 打开一个 PostgreSQL 连接 持久数据库连接

PHP:pg_ping()的用法_PostgreSQL函数 pg_ping(PHP4=4.3.0,PHP5)pg_pingPing数据库连接说明boolpg_ping(resource$connection)pg_ping()ping数据库连接,如果中断则尝试重新连接。如果连接在活动状态返回TRUE,否

PHP:pg_parameter_status()的用法_PostgreSQL函数 pg_parameter_status(PHP5)pg_parameter_statusLooksupacurrentparametersettingoftheserver.说明stringpg_parameter_status([resource$connection],string$param_name)Looksupacurrentparametersettingoftheserve

PHP:pg_options()的用法_PostgreSQL函数 pg_options(PHP4,PHP5)pg_options获得和连接有关的选项说明stringpg_options(resource$connection)pg_options()以字符串形式返回指定PostgreSQLconnection资源的连接选项。

标签: php-cp

本文链接地址:https://www.jiuchutong.com/biancheng/281459.html 转载请保留说明!

上一篇:PHP:pg_port()的用法_PostgreSQL函数(php poll)

下一篇:PHP:pg_ping()的用法_PostgreSQL函数(php实现ping功能)

  • 增值税发票平台怎么下载已认证发票
  • 出口退税免税政策
  • 未完工程如何处理
  • 技术服务费入账
  • 简易征收的老项目是指什么时候
  • 发票与入库单明细不一致税务可以吗
  • 合并抵消分录的原理是什么
  • 建筑企业一般纳税人简易计税办法
  • 长期负债营运资金比率公式
  • 错账更正分录
  • 出口转内销增值税报表怎么填
  • 怎么把原材料转为成本
  • 非在职员工是什么意思
  • 非独立核算的分公司是法人主体吗
  • 北京建筑施工企业排名
  • 取得以前年度审计报告应归入阶段底稿
  • 企业税收负担率一般达到多少算正常
  • 什么是遗产税什么是税
  • 提高并购成本
  • 采用简易计税方法
  • 企业支付水电费属于什么费用
  • 个体户季度超30万要交多少税
  • 专用发票右上角的数字表示什么
  • 盘盈入库和其他入库
  • 应付账款少付怎么做账
  • 重装系统出现无效签名
  • 拦截恶意网址是什么意思
  • 费用跨年的分录怎么做
  • linux中!
  • 入库的原材料单价怎么求
  • 房地产企业开发成本结转
  • 代办退税账务处理
  • 收到税务汇算清缴怎么办
  • 期间费用计入什么科目
  • 苹果a1530是什么
  • php指定参数类型
  • yolo xml转txt
  • 罚款属于应付账款吗
  • 杜布罗夫尼克老城去机场
  • nerf 入门
  • vue中事件
  • yolov3输出是什么
  • open开放的意思吗
  • 车辆处置收入入什么科目
  • 农民专业合作社名词解释
  • 合作卖东西怎么分成
  • mongodb建立索引的命令
  • 企业出租的存货包括
  • 何谓应该是什么意思
  • 所有者权益和负债的主要区别
  • 什么叫转让财产收入
  • 业务分成方案
  • 不动产出租要交什么税
  • 长期股权投资损失可以税前扣除吗
  • 职工福利费如何入账
  • 收到银行存款利息
  • 车辆上牌的费用应付多少?
  • 固定资产清理账户期末有余额吗
  • 应交税费的记账分录
  • 每个银行都有结息
  • 跨期发票会计处理
  • 项目成本的估算与预算有什么区别和联系?考试资料网
  • 明细账模版
  • 处置固定资产损失的账务处理
  • sql server使用教程
  • windows打不开添加打印机
  • win8系统一直重启
  • ubuntu photoshop
  • ubuntu 改名
  • 电脑怎么装双系统win10和linux
  • centos基础命令
  • win8开始菜单在右边
  • win10浏览器没有网络连接
  • win10预览版21301bug
  • 利用python进行
  • jquery滚动条滚动到指定位置
  • nodejs查找文件
  • vue实现下载功能
  • 基于javascript的毕业设计选题
  • 广东地税服务电话
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

    网站地图: 企业信息 工商信息 财税知识 网络常识 编程技术

    友情链接: 武汉网站建设