位置: 编程技术 - 正文

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

  • 销项税额和进项税额发票怎么区别
  • 增量留抵税额怎么做分录
  • 印花税减免退税会计分录
  • 事业单位财政拨款取得方式
  • 固定资产折旧购买日期还是使用日期呢
  • 农产品核定扣除增值税进项税额计算表
  • 老板从公司拿钱怎么拿税最低
  • 建筑公司支付给个人的劳务费计入什么科目
  • 双倍余额递减法折旧公式
  • 收到采购商品
  • 企业劳务发票怎么开,税率是多少
  • 个人劳务报酬个人所得税怎么算
  • 装修行业属于什么行业分类
  • 税控盘未上传发票查询
  • 建筑增值税抵扣怎么算
  • 出现一窗式比对失败,该纳税人没有防伪税控比对信息!
  • 单位年底发放的补助
  • 社会团体收取的会费可以用于哪些方面
  • 建筑劳务公司开发票
  • 增值税税率调整时间16变13
  • 同期比较百分比如何计算
  • 应纳税所得额未减上季度所得税,下季度可补减吗
  • 非关联企业无偿拆借资金企业所得税
  • 含税价什么意思?
  • 鸿蒙系统通知栏和控制
  • win10系统如何卸载ie11
  • 每月计提的工资包含社保吗
  • 预缴增值税会产生滞纳金吗
  • php数组函数题目
  • pcas service进程可以关闭么
  • win101903怎么查看
  • php string
  • 返还保证金的法律依据
  • php r
  • 国有资产无偿使用违反什么规定
  • framework3.5怎么打开
  • php处理xml
  • 行政单位捐赠会计分录怎么做的
  • 发票查真伪是什么意思
  • 微信小程序获取地理位置
  • 利润表的本月数怎么算
  • 个体工商户必须报税吗
  • 品牌代理费计入什么费用
  • 未达到起征点的增值税怎么填写
  • 车船税酌定减免
  • centos7.1
  • 物流公司驾驶员工资计算方式
  • sqlserver2005属于
  • mysql在表中添加一个新的属性
  • 小企业长期债券投资入账价值
  • 单位房屋出租收入应交哪些税
  • 旅行社开具的发票
  • 先征后退增值税是否征收企业所得税
  • 有限合伙企业的税收筹划
  • 收到外国人的礼物怎么感谢
  • 小型微利企业预缴企业所得税怎么算
  • 已经认证的进项票销售方冲红了
  • 小规模纳税人增值税计算公式
  • 失控发票已补税及滞纳金后还有事吗
  • mysql创建一个数据表
  • win7下安装ubuntu
  • win10安全系统
  • server2008 无法启动
  • linux的ip查看
  • 怎么快速更换苹果手机壁纸
  • linux内存耗尽怎么解决
  • unity 漫反射
  • js函数命名
  • andriod+nfc
  • 深入浅出python中文第二版pdf
  • js很简单
  • javascript如何绘制曲线
  • python字典x in d
  • python里list
  • 医院能开增值税开发票吗
  • 安庆税务局窗口电话
  • 票种删除需要怎么弄
  • 河南省单位怎么打印社保花名册
  • 公司欠税交不起股东责任
  • 武汉 工资 税
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设