位置: 编程技术 - 正文

PHP:pg_send_execute()的用法_PostgreSQL函数

编辑:rootadmin
pg_send_execute

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

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

(PHP 5 >= 5.1.0)

pg_send_execute — Sends a request to execute a prepared statement with given parameters, without waiting for the result(s).

说明 bool pg_send_execute ( resource $connection , string $stmtname , array $params )

Sends a request to execute a prepared statement with given parameters, without waiting for the result(s).

This is similar to pg_send_query_params(), but the command to be executed is specified by naming a previously-prepared statement, instead of giving a query string. The function&#;s parameters are handled identically to pg_execute(). Like pg_execute(), it will not work on pre-7.4 versions of PostgreSQL.

参数

connection PHP:pg_send_execute()的用法_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 of the prepared statement to execute. if "" is specified, then the unnamed statement is executed. The name must have been previously prepared using pg_prepare(), pg_send_prepare() or a PREPARE SQL command.

params

An array of parameter values to substitute for the $1, $2, etc. placeholders in the original prepared query string. The number of elements in the array must match the number of placeholders.

返回值

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

范例

Example #1 Using pg_send_execute()

<?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_prepare() - Submits a request to create a prepared statement with the given parameters, and waits for completion. pg_send_prepare() - Sends a request to create a prepared statement with the given parameters, without waiting for completion. pg_execute() - Sends a request to execute a prepared statement with given parameters, and waits for the result.

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_result_seek()的用法_PostgreSQL函数 pg_result_seek(PHP4=4.3.0,PHP5)pg_result_seek在结果资源中设定内部行偏移量说明arraypg_result_seek(resource$result,int$offset)pg_result_seek()在结果资源中设定内部行偏移量

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

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

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

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

  • 所得税月度申报
  • 天然气管网输送费收费标准
  • 中外合资企业要交什么税
  • 新办企业申请一般纳税人的资料
  • 已认证的专票发票在哪里
  • 综保区和自贸区的联系
  • 专项应付款在资产负债表中如何列示
  • 增值税发票选择确认平台勾选注意事项
  • 注销公司报表应注意什么
  • 建造普通标准住宅出售,增值税超过扣除金额的
  • 进项税超期怎么办
  • 企业间借款增值税税率
  • 农产品销售发票能否抵扣进项税?
  • 退关税怎么入账
  • 投资性房地产转为自用的会计处理
  • 鸿蒙系统字体不太好看
  • 转让无形资产的所有权计入什么科目
  • windows 11预览版
  • 未分配利润可留待以后年度进行分配的当年结余利润
  • php静态变量生命周期
  • 存货出租的会计分录
  • svchost一直在下载什么
  • php中的include
  • php getheader
  • 企业所得额不能扣除
  • 防伪税控盘全额抵扣政策
  • 生产企业成本会计难吗?
  • php生成xml文件
  • 按钮实现开关功能
  • 前端实现文件下载列表
  • 虚拟机安装win11提示无法运行
  • php curl 封装
  • phpcms怎么用
  • 企业对外报送的财务报表
  • 出口货物不予免、抵和退税为什么是按外销离岸价计算
  • 工程项目发票几个点
  • python cox
  • 应交增值税账面余额与报税余额不符
  • 应收账款让售会计怎么做
  • 残疾人保障金所属期怎么填
  • 收付转凭证和记帐凭证的区别?
  • 基本账户的定义
  • 买理财产品的风险
  • 高新技术企业亏损弥补的年限为十年
  • 房地产开发结转成本
  • 房地产企业出售商铺交什么税
  • 职工教育经费还有什么经费
  • 工会经费与工会福利的区别
  • 支付结算办法是部门规章吗
  • 专利转让费一般是多少
  • 融资租赁增值税的计税依据
  • 营改增后预交营业税怎么处理
  • 摊销费用如何做账
  • 没有入账的固定资产怎样做账
  • 领用自产产品用于固定资产
  • sql server索引的使用
  • sql server常用
  • centOS7安装MySQL数据库
  • sql2000数据库怎么使用
  • Win10技巧:如何开启隐藏的锁屏时间设置项
  • 安装xps虚拟打印机
  • 苹果知识大全
  • win7 c盘莫名其妙满了
  • 为什么无法退出
  • cocos2dx-js
  • opengl做简单的模型
  • python内置函数什么用来返回序列中的最大元素
  • vue.js购物车
  • 安卓返回按钮图标
  • 在dos下删除文件
  • android toast位置
  • unity gui layer
  • unity 3d教程
  • javascriptz
  • js如何输出页面内容
  • 简单Python代码
  • javascript获取复选框的值
  • 发票开了,税务局上查不到信息是怎么回事
  • 漏报原因
  • 湖南自然人电子税务局官网
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设