位置: 编程技术 - 正文

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函数

  • 2023年印花税税率口诀
  • 简易征收怎样计提增值税
  • 销售额是含税价还是不含税价
  • 年末结转净利润
  • 购买网银盾计入什么科目
  • 施工单位临时设施搭建费属于
  • 企业有利润要交什么税
  • 汽车年审属于什么费用
  • 工业土地划拨性质有年限吗
  • 商场采用联营方式的原因
  • 业务招待费取得的专票可以抵扣吗
  • 涉税软件技术维护费可以全额抵扣吗?
  • 建筑分包项目有哪些内容
  • 冲红发票金额大怎么办
  • 单张发票不超过1万
  • 会计账目怎么理
  • 员工出差买的保险怎么入账
  • 暂估固定资产原值减少
  • mac怎么安装字体文件
  • 老毛桃u盘启动盘制作工具怎么安装win10系统 老毛桃u盘安装win10系统图文教程
  • 收到项目资本金可以记到实收资本吗
  • 发生以前年度损益调整
  • win10怎么看已安装的驱动
  • 制作flash动画步骤
  • php preg_quote
  • 以前年度损益调整借贷方向
  • 增值税跟企业所得税的关系
  • win10教育版升级win11
  • 将债务转为资本的,债务人应当将债权人
  • win7纯净版系统怎么安装
  • php 强类型
  • 运费抵扣怎么算
  • 专项应付款费用化
  • 自产的产品对外捐赠
  • vue实战开发项目视频
  • 收到转账怎么写分录
  • 差旅费住宿费专票抵扣联贴在哪里
  • 企业的职工教育经费计入什么费用
  • 变化检测是应用在图像的哪个运算中
  • 如何网上添加办税员上海
  • 图书的税率有免税的吗
  • 收到进项发票不认证可以吗
  • 增值税发票作废后怎么处理
  • open com failed
  • 公司租入厂房怎么做账
  • abs函数python怎么用
  • 结转本年利润什么意思
  • 先息后本贷款利息计算器
  • mysql错误提示
  • mysql查询重复的全部删除
  • 确认应付职工薪酬怎么算
  • 单位房屋出租收入应交哪些税
  • 冲减以前年度管理费用需要更正报表吗
  • 普通发票的开具是?
  • 个人所得税汇算年收入不超过12万
  • 股权转让会计分录借银行存款
  • 代收的车船税没有发票怎么入账
  • 银行 收美金
  • 商家说垫付运费
  • 商业承兑汇票贴现流程
  • 以前年度损益调整账务处理分录
  • 企业处理原材料会计分录
  • sql server设置自增
  • win8的运行在哪里打开
  • win10系统如何将c盘的软件移到d盘
  • xp系统怎么装系统教程
  • ubuntu18.04网络
  • mac 应用
  • 组策略禁用u盘怎么打开
  • linux中安装命令
  • js正则表达式gi
  • css教程大全
  • 基于javascript的毕业设计
  • unity怎么设置多个关卡
  • js学习教程
  • jQuery ajaxForm()的应用
  • Android使用的方式来管理
  • 香皂需要换着用吗
  • 张雪峰谈建筑专业
  • 已经开票的房子还能退吗
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设