位置: 编程技术 - 正文

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万怎么上税
  • 不能抵扣的福利发票要勾选吗为什么
  • 小规模建筑安装增值税税率是多少
  • 委托销售的增值税税率
  • 股东以车辆出资 涉及哪些税费
  • 招待客户产生的住宿费
  • 为什么收到发票
  • 出口退税增值税发票稽核信息
  • 企业微信收入也要交税吗
  • 个体户生产所得税怎么计算
  • 个人所得税和企业所得税都要交吗
  • 出口企业年底结转税金
  • 资本公积主要包括哪些内容
  • 如何在qq好友旁边打字
  • 平安树的养殖方法和浇水时间
  • 讲述人功能怎么关闭
  • vitem
  • element分页器
  • wordpress.org
  • 宝塔面板安装zabbix
  • php设置图片将图片居中
  • 鼓励证券投资基金的政策
  • 太平鸟的翅膀上有几道红羽毛
  • php生成验证码代码
  • 已抵扣增值税进什么科目
  • 梅尔加足球俱乐部
  • vue引用svg矢量图
  • 自动化测试是怎样的
  • 图幅翻译
  • 帝国cms适合建什么站
  • 什么是印花税,怎么征收
  • 未认证发票如何导出
  • 行政事业单位支出劳务费规定
  • 法人可以开个人票会怎么样
  • 企业境外收入境内申报
  • mysql分页性能优化
  • 长期资产包含哪些
  • 冲销以前年度费用会计分录
  • 个人所得税专项扣除新标准一览表最新
  • 报废的机器设备属于什么会计要素
  • 购入固定资产入账会计凭证怎么做
  • sqlserver完整备份
  • 企业出售自用房产开具增值税
  • 应交税费未交增值税借方表示什么
  • 增值税留抵情况下要交流转税吗
  • 计提社保和工资一起怎么做账
  • 利润分配明细科目有哪些
  • 一般纳税人的进项税率是多少
  • 如何计算技术转让所得
  • 非金融企业之间借款账务处理
  • win8磁盘占用率高怎么处理
  • 不一样的萧先生
  • Windows Vista下IIS使用常见问题
  • mac如何快速关闭程序
  • 密码多次错误被锁定怎么办
  • windows7怎么切换
  • Win10控制面板打不开
  • 深入解析java编译器源码剖析与实例详解pdf百度云
  • jquery技巧
  • learning android
  • js过滤filter
  • unity 开发游戏
  • js全局变量怎么定义
  • python3中raw_input的用法
  • 土增税税负率一般多少
  • 财政临时工是什么
  • 泉州市税务局投诉电话
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设