位置: 编程技术 - 正文

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)

  • 农村合作社怎么挣钱
  • 进项3个点销项13个点,增值税
  • 附加税减半征收的条件
  • 车辆保险车船税怎么做会计分录
  • 个人所得税累计收入
  • 经营许可证要交税吗
  • 机械租赁小规模企业所得税
  • 同一控制下企业合并报表编制
  • 内部报送会计信息有哪些
  • 外商投资企业采取发包、出租经营
  • 房地产企业会计制度
  • 一般公共预算支出是什么意思
  • 装修预付款怎么做分录
  • 清算备付金的会计科目
  • 用于集体福利的消费税
  • 预缴增值税为什么记借方
  • 可供出售金融资产和长期股权投资
  • 工会发放员工福利的通知
  • 劳务费差额征税的账务处理
  • 宜宾劳务公司有哪些
  • 酒店产权式经营业主取得的收入按股利红利所得
  • 企业汇算清缴后还能更正吗
  • 增量留底税额怎么进行确定
  • 商用房的增值税是多少
  • 交易性金融资产入账价值怎么计算
  • 个人出租车辆给公司个人所得税
  • mac上安装homebrew
  • 企业分配利润的原则
  • 现金收入支出表怎么填
  • multiple editions是什么版本
  • 缴纳印花税和残值的比例
  • 报销货物运输费需要什么凭证
  • 如何检查文档
  • 微信聊天记录备份和恢复
  • u8销售类型怎么设置
  • php多条件搜索功能的实现
  • zabbix 执行命令
  • echarts在地图上标记图标
  • 使用ChatGPT进行AI对话
  • 帝国cms设置获取IP字段
  • 政府补贴什么时候开始的
  • 企业应收是什么意思
  • 个人所得税法实施细则2023
  • 视同销售是指什么
  • 收购企业怎么做账
  • 经营范围没有的项目开票了会怎么样
  • 营改增一般纳税人简易征收的范围
  • db2 -952
  • 出口退税是什么
  • 商业汇票贴现条件有哪些
  • 签订三方协议是办理实时扣税的前提,这里三方是指
  • 餐饮企业餐具计入什么科目
  • 事业单位结余是什么意思
  • 公司突然改变工资结构
  • 工程款的税费怎么计算
  • 长期债券是长期借款吗
  • 因企业增资而产生的费用
  • 销项税和进项税的借贷方向
  • 企业增资的流程
  • sql server重新安装步骤
  • 基于mysql的sql应用
  • 高端电脑品牌
  • 电脑上view是什么意思
  • vmware workstation15安装ubuntu
  • windows 7中,执行应用程序的方法有哪几种?
  • linux常用命令清除
  • shell切分
  • bat怎么设置
  • opengl shader实例
  • js str.match
  • vue复用node_module
  • 原单位已交社保,新单位怎么办
  • 广东省国家税务总局稽查局局长
  • 江西省税务电子官网
  • 国税地税征管体制改革方案
  • 广东佛山超市排名
  • 定额发票作废了还能报销吗
  • 山西省税务局网站系统维护公告
  • 发票抽奖还有吗
  • 美国汽车进口关税25%
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设