位置: 编程技术 - 正文

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)

  • 销售净收入咋算
  • 个体户一季度不超过30
  • 餐饮业可以开增值税专用发票吗?
  • 价税分离合同印花税的计税依据怎么算
  • 津贴和补贴计入加班费吗
  • 2019年工会经费新规定
  • 哪些纳税人需要实名办税
  • 当年实现的利润弥补亏损会计分录
  • 预收账款本期发生额怎么算
  • 所得税汇算清缴退税会计分录怎么做
  • 公司购买商品房契税税率
  • 个人承包集体企业历史
  • 专票的税金
  • 贸易公司一般纳税多少
  • 一般纳税人取得小规模纳税人的专票可以抵扣吗
  • 单位为员工缴纳社保分录
  • 车辆购置税能抵扣税款吗
  • 红冲发票显示发票状态不正常
  • 公户转账备注写错会查吗
  • 自然人个税起征点2019税率表
  • 会计利润和税务利润的暂时性差异和永久性差异
  • 小规模需要交所得税吗
  • 企业涉及预计负债的主要事项包括
  • 当月扣缴社保需要申报吗
  • 腾讯手游助手如何隐藏鼠标
  • 戴尔笔记本电脑哪款性价比最高
  • 外观专利的价值
  • 筹建期固定资产汇算清缴
  • 税务实名认证是不是就是税务登记
  • win11安装更新时出现一些问题
  • 电脑找不到u盘怎么解决
  • 电子商票到期后多少天有效?
  • nomoreporn.exe - nomoreporn是什么进程 有什么用
  • 固定资产的主要特征有哪些
  • 大家掌握的都很好 英语
  • 哪些情况即使取消核酸
  • 福利费需要缴税吗
  • php中的pdo
  • yii2框架从入门到精通pdf
  • 垃圾清运费属于什么服务
  • vue3官方教程
  • php图像识别
  • 销售服饰
  • 基本户不注销会扣钱吗
  • vuex数据持久化
  • 融资租出的办公楼
  • 退预收款需要对账吗
  • 外经证是啥样
  • 福利部门领用材料计入什么科目
  • 融资租赁确认的具体条件
  • mysql存储语句
  • 购置环保设备一次性扣除
  • 购买办公楼分期合同
  • 股东股权转让印花税 公司承担
  • 教育费附加免征文件
  • 对公账户进出账常识
  • 展示费是业务宣传费吗
  • 个人无偿赠与不动产税收管理
  • mysql存储过程是什么意思
  • django使用mysql
  • 在windows中下列叙述正确的是什么
  • mac怎么设置开机默认windows
  • windows的视频
  • win7 用户组
  • win7如何删除网络上的其它计算机
  • win10 预览版 移除 tab 栏 特性
  • win10右键菜单快捷键
  • win10系统自带虚拟机无法启
  • win10预览在哪
  • win11系统ie浏览器
  • js获取选中的checkbox
  • 深入理解javascript特性
  • android自定义viewgroup绘制
  • jQuery实现的可编辑表格完整实例
  • 如何查询纳税信用级别
  • 湖北省电子税务局新版登录操作简介
  • 国家浙江税务局
  • 2023年四川城乡居民养老保险多少钱
  • 农民专业合作社章程完整版
  • 个人所得税的工资比实际的多
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设