位置: 编程技术 - 正文

PHP:pg_send_prepare()的用法_PostgreSQL函数

编辑:rootadmin
pg_send_prepare

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

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

(PHP 5 >= 5.1.0)

pg_send_prepare — Sends a request to create a prepared statement with the given parameters, without waiting for completion.

说明 bool pg_send_prepare ( resource $connection , string $stmtname , string $query )

Sends a request to create a prepared statement with the given parameters, without waiting for completion.

This is an asynchronous version of pg_prepare(): it returns TRUE if it was able to dispatch the request, and FALSE if not. After a successful call, call pg_get_result() to determine whether the server successfully created the prepared statement. The function&#;s parameters are handled identically to pg_prepare(). Like pg_prepare(), it will not work on pre-7.4 versions of PostgreSQL.

参数

connection PHP:pg_send_prepare()的用法_PostgreSQL函数

PostgreSQL database connection resource. When connection is not present, the default connection is used. The default connection is the last connection made by pg_connect() or pg_pconnect().

stmtname

The name to give the prepared statement. Must be unique per-connection. If "" is specified, then an unnamed statement is created, overwriting any previously defined unnamed statement.

query

The parameterized SQL statement. Must contain only a single statement. (multiple statements separated by semi-colons are not allowed.) If any parameters are used, they are referred to as $1, $2, etc.

返回值

Returns TRUE on success, FALSE on failure. Use pg_get_result() to determine the query result.

范例

Example #1 Using pg_send_prepare()

<?php$dbconn=pg_connect("dbname=publisher")ordie("Couldnotconnect");//Prepareaqueryforexecutionif(!pg_connection_busy($dbconn)){pg_send_prepare($dbconn,"my_query",'SELECT*FROMshopsWHEREname=$1');$res1=pg_get_result($dbconn);}//Executethepreparedquery.Notethatitisnotnecessarytoescape//thestring"Joe'sWidgets"inanywayif(!pg_connection_busy($dbconn)){pg_send_execute($dbconn,"my_query",array("Joe'sWidgets"));$res2=pg_get_result($dbconn);}//Executethesamepreparedquery,thistimewithadifferentparameterif(!pg_connection_busy($dbconn)){pg_send_execute($dbconn,"my_query",array("ClothesClothesClothes"));$res3=pg_get_result($dbconn);}?>

参见

pg_connect() - 打开一个 PostgreSQL 连接 pg_pconnect() - 打开一个持久的 PostgreSQL 连接 pg_execute() - Sends a request to execute a prepared statement with given parameters, and waits for the result. pg_send_execute() - Sends a request to execute a prepared statement with given parameters, without waiting for the result(s). pg_send_query_params() - Submits a command and separate parameters to the server without waiting for the result(s).

PHP:pg_send_execute()的用法_PostgreSQL函数 pg_send_execute(PHP5=5.1.0)pg_send_executeSendsarequesttoexecuteapreparedstatementwithgivenparameters,withoutwaitingfortheresult(s).说明boolpg_send_execute(resource$connection,string$stmtname,array$

PHP:pg_select()的用法_PostgreSQL函数 pg_select(PHP4=4.3.0,PHP5)pg_select选择记录说明mixedpg_select(resource$connection,string$table_name,array$assoc_array[,int$options=PGSQL_DML_EXEC])pg_select()根据assoc_array数组中的field=v

PHP:pg_result_status()的用法_PostgreSQL函数 pg_result_status(PHP4=4.2.0,PHP5)pg_result_status获得查询结果的状态说明intpg_result_status(resource$result)pg_result_status()返回该查询结果资源的状态。可能的返回值有PGSQ

标签: PHP:pg_send_prepare()的用法_PostgreSQL函数

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

上一篇:PHP:pg_send_query_params()的用法_PostgreSQL函数

下一篇:PHP:pg_send_execute()的用法_PostgreSQL函数

  • 企业所得税留抵税额会显示在申报表上吗?
  • 递延所得税资产和负债怎么理解
  • 金税四期什么时候正式上线
  • 缴注册印花税怎么做账
  • 增值税加计扣除账务处理
  • 物业补贴计入什么科目
  • 装订凭证要如何写
  • 个人所得税没有税也要申报吗
  • 多缴所得税返还现金流
  • 法人转钱到公户是借款还是投资款
  • 行政单位基建账统一核算
  • 增值税专用发票电子版
  • 注册资本未到位注销公司处理
  • 劳务派遣专用发票超过9万怎么办理
  • 企业所得税清算是什么意思
  • 如何理解纳税人资格
  • 股东垫资需要偿还吗
  • 未分配利润期末余额怎么算出来
  • 公司账上的资金与注册资金不一致可以吗?
  • 自产货物用于捐赠的会计处理
  • 发票作废什么时候生效
  • 企业所得税只能抵扣吗
  • surface安装win10专业版
  • 不含税进货价
  • mac版本系统
  • 什么叫冲减进项税额
  • 劳务分包费用组成比例
  • php mysql_real_escape_string函数用法与实例教程
  • linux中怎么安装GUI
  • 企业为员工提供服务要交增值税吗
  • ESP32-CAM AI THINKER 引脚排列:GPIO 用法说明
  • 转让土地需要办什么手续
  • vue权限管理面试题
  • axios请求数据的数据类型
  • 开源cti
  • mail命令详解
  • sudo命令功能
  • html用javascript
  • 2020年防洪基金计算公式
  • 应交增值税为负数怎么处理
  • 现代服务业加计抵减最新政策2022
  • 法人名称是什么意思
  • mysql数据库基本操作
  • 接待客户的住宿费发票是开谁的
  • 税控盘怎么看是否清盘
  • 经营费用包括工资吗
  • sqlserver数据库提示授权过期
  • win2008安装sql2008教程
  • 企业按季度交税
  • 应付账款重分类是什么意思
  • 车船使用税必须每年都交吗
  • 车辆抵押贷款怎么办理
  • 折旧后的剩余价值叫什么
  • 为在建工程发生的差旅费
  • 出口退税后发生退货补缴怎么算增值税
  • 支付银行贷款利息的会计处理
  • 企业无力支付票据时应计入
  • 总产值的计算方法是什么
  • 差旅费属于什么会计要素
  • 明细账示例图
  • 在Mac OS Yosemite 系统中如何发送超大邮件附件
  • xp系统登陆界面切换用户
  • windows7找不到无线
  • win8.1开机进入桌面
  • linux系统基本操作命令
  • 怎么看win8还是win10
  • linux block io
  • nodejs web3
  • perl中use的用法
  • js解析文本文件
  • unity update优化
  • android开源库
  • javascript初级教程
  • python的链表
  • 税控盘登录密码忘了怎么办怎么重置
  • 小型微利企业所得税优惠
  • 税务安装步骤
  • 贵州省国家税务局
  • 土地使用税2023征收标准
  • 处理报废固定资产
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设