位置: 编程技术 - 正文

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

  • 企业在异地设立的办事处撤销了,人员咋办
  • 公司的纳税人识别号怎么查询
  • 偶然所得个人所得税会计分录
  • 税后营业利润和利润总额的区别
  • 怎样查是否为一类银行卡
  • 个人向个人借款100万交税吗
  • 加油卡充值发票怎么入账
  • 租借车辆发生事故后的保险理赔问题
  • 准则依据
  • 房产税和土地使用税会计分录
  • 普通商户怎么开小票
  • 会计中应收账款的英文
  • 安全费用支出范围包括
  • 购进原材料验收入库,贷款商业汇票结算
  • 没有按时缴纳税属于什么
  • 购买物品的专用会计科目
  • 发票离线限额什么意思
  • 哪些理财产品能赎回
  • 建筑安装施工过程
  • 年末利润分配会计处理
  • 预付款和现金支付的区别
  • 给研发人员福利怎么做账
  • 资询服务收入算服务还是劳务
  • 在建工程暂估转固定资产
  • 微信收款会计分录,然后提现有手续费
  • hbuilder打包apk
  • 腾讯电脑管家怎么修复dll
  • win11怎么提高运行内存
  • php制作一个表单
  • php adodb
  • 如何设置谷歌浏览器语言为中文
  • 享受企业所得税优惠政策的农产品初加工范围
  • 二手商铺的税费太高了吧
  • 企业合并分立
  • php编程技术
  • 中科院院士2023增选
  • php2008
  • vue假数据
  • 人工智能机器人的好处
  • /f命令
  • 万能转换器mp4
  • 缴税的会计处理
  • 土地出让与土地划拨有什么区别
  • 增值税专票三联都丢了写情况说明可以吗
  • pandas常见操作
  • db2 -x
  • python send_from_directory
  • 低值易耗品指的价格
  • sql乘函数
  • 费用月结怎么记账
  • 减值准备的会计科目
  • 坏账准备是啥意思
  • 信用卡产生滞纳金会影响信用吗
  • 一般纳税人购进商品的会计分录
  • 旅客运送的一般规定
  • 发票 发票专用章
  • 一般纳税人弱电包工包料怎么开票
  • 债权投资和其他应收款的区别
  • 凭证导致账簿错误
  • 私营公司无形资产怎么算
  • mysql的ip怎么看
  • mysql怎么直接向表中写数据
  • T-SQL中使用正则表达式函数
  • mysql自动停止的解决办法
  • backup file
  • Windows XP用户账户控制
  • 怎么彻底关闭windows更新
  • win10推送win11
  • 硬盘安装windows xp
  • win8怎么开机不用密码
  • opengl learning
  • javascript怎么做
  • python里模块
  • js中date
  • js获取浏览器类型和版本信息
  • javascript tr
  • javascript的for循环
  • jquery基础知识梳理
  • 国家税务总局遴选拟录取名单
  • 新疆皮山县概况
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设