位置: 编程技术 - 正文

PHP:pg_execute()的用法_PostgreSQL函数

编辑:rootadmin
pg_execute

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

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

(PHP 5 >= 5.1.0)

pg_execute — Sends a request to execute a prepared statement with given parameters, and waits for the result.

说明 resource pg_execute ([ resource $connection ], string $stmtname , array $params )

Sends a request to execute a prepared statement with given parameters, and waits for the result.

pg_execute() is like pg_query_params(), but the command to be executed is specified by naming a previously-prepared statement, instead of giving a query string. This feature allows commands that will be used repeatedly to be parsed and planned just once, rather than each time they are executed. The statement must have been prepared previously in the current session. pg_execute() is supported only against PostgreSQL 7.4 or higher connections; it will fail when using earlier versions.

The parameters are identical to pg_query_params(), except that the name of a prepared statement is given instead of a query string.

参数

connection PHP:pg_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.

Warning

Elements are converted to strings by calling this function.

返回值

A query result resource on success 或者在失败时返回 FALSE.

范例

Example #1 Using pg_execute()

<?php//Connecttoadatabasenamed"mary"$dbconn=pg_connect("dbname=mary");//Prepareaqueryforexecution$result=pg_prepare($dbconn,"my_query",'SELECT*FROMshopsWHEREname=$1');//Executethepreparedquery.Notethatitisnotnecessarytoescape//thestring"Joe'sWidgets"inanyway$result=pg_execute($dbconn,"my_query",array("Joe'sWidgets"));//Executethesamepreparedquery,thistimewithadifferentparameter$result=pg_execute($dbconn,"my_query",array("ClothesClothesClothes"));?>

参见

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_query_params() - Submits a command to the server and waits for the result, with the ability to pass parameters separately from the SQL command text.

PHP:pg_delete()的用法_PostgreSQL函数 pg_delete(PHP4=4.3.0,PHP5)pg_delete删除记录说明mixedpg_delete(resource$connection,string$table_name,array$assoc_array[,int$options=PGSQL_DML_EXEC])pg_delete()删除符合条件的记录,条件

PHP:pg_escape_bytea()的用法_PostgreSQL函数 pg_escape_bytea(PHP4=4.2.0,PHP5)pg_escape_bytea转义bytea类型的二进制数据说明stringpg_escape_bytea(string$data)pg_escape_bytea()转义bytea数据类型的二进制字符串,返回转义

PHP:pg_end_copy()的用法_PostgreSQL函数 pg_end_copy(PHP4=4.0.3,PHP5)pg_end_copy与PostgreSQL后端同步说明boolpg_end_copy([resource$connection])pg_end_copy()在处理完pg_put_line()所执行的拷贝操作之后将PostgreSQL前端(

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

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

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

下一篇:PHP:pg_delete()的用法_PostgreSQL函数(php destruct)

  • 金税盘老是重复更新进不去
  • 计提租赁费用
  • 资产负债表债务法核算所得税
  • 进项税额可以不转出吗
  • 计提减值准备是什么凭证
  • 6月份的申报期是几号
  • 纳税申报 财务报表利润表
  • 工资3700扣多少社保钱
  • 建筑企业会计科目分类及明细表
  • 分配利润和分配股利
  • 商贸公司账务复杂吗
  • 企业为什么用银行承兑汇票
  • 收取线路维护费合法吗
  • 在途物资期末借方
  • 折旧率通俗理解
  • 基本社会保障性缴款包括什么
  • 股东退股会计科目
  • 筹建期间发生的收入
  • 硬盘的日常维护需要做到什么?
  • 本年利润余额的计算公式
  • 贷款资金取现就无法追查了吗
  • php数组函数有哪些
  • php数组函数题目
  • 多台电脑如何建立局域网
  • 纳税人解除劳动合同补偿
  • 附有退回条件的销售商
  • phpstudy备份数据库
  • 将城镇生活垃圾直接用作肥料
  • 金银首饰零售业税负率是多少
  • vue.js devtools插件下载
  • 非同级财政拨款收入属于什么科目
  • 低代码开发开源
  • 调戏chatGPT(二)下围棋
  • 人力资源公司财务工作心得与感悟
  • 商业承兑汇票贴现会计分录
  • 房东租金收据
  • 固定资产清理怎么报税呢
  • mysql常用命令汇总
  • mongodb replica set 添加删除节点的2种方法
  • 季中转一般纳税人申报了小规模后无法勾选认证
  • 增值税发票用完后如何领取新的
  • 建筑工程发票来自哪里
  • 增值税发票有哪些项目
  • sqlserver2008r2怎么使用
  • 增值税进项税额加计抵减会计处理
  • mysql数据库恢复方式
  • 小规模未达起征点销售额是多少
  • 员工福利费属于什么会计科目
  • 小规模纳税人申报步骤
  • 发放个税返还用不用申报
  • 税收优惠附加税怎么计算
  • 营改增后营业费用科目还有吗
  • 多缴所得税返还会计分录
  • 出口货物不予免税的原因
  • 生产成本的会计科目分录
  • 工资达不到5000个人所得税
  • 预收账款账务处理流程图
  • 房屋装修费用的会计科目
  • 获取sql
  • mysql批量删表
  • 在linux系统中安装软件
  • mysql操作教程
  • 判断一个表是否存在
  • 在linux系统中
  • 关闭空闲的ide通知怎么写
  • ubuntu16.04安装步骤
  • 视频对比度饱和度亮度最佳值
  • xp系统有什么用
  • mmtray2k.exe有什么作用 是什么进程 mmtray2k进程查询
  • win7的放大镜怎么关闭
  • win8怎么下载itunes
  • python在web上的应用
  • unity中国代理
  • css怎么设置表单居中
  • javascript:void(0)的作用示例介绍
  • 单例类python
  • jsonobject.parseobject异常
  • 四川税务局网上办税
  • 司法拍卖车免除扣分吗
  • 征地税税率是多少
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设