位置: 编程技术 - 正文

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)

  • 税务师考试要求核酸检测
  • 金税四期上线后还需要会计吗
  • 企业电子发票申请不成功原因
  • 采购返利怎么生成发票
  • 政府补贴的递延收益
  • 增值税计算为什么是销项减进项
  • 小规模纳税人不开票收入怎么报税
  • 税务机关六位地区编码是什么
  • 结转损益管理费用在借方
  • 增值税降到16个点什么时候实行
  • 个人出口货物到国外
  • 建筑企业预收款开具不征税发票为什么要预缴
  • 收到联营单位预收的发票
  • 工程在建期间土地的摊销如何处理
  • 代扣代缴个人所得税计入哪个科目
  • 增值税检查调整科目已经删除
  • 剪头开发票
  • 增值说税率怎么计算
  • 一个月无纳税凭证怎么处理
  • 什么情况哦
  • 公司注销注销顺序
  • 公司购车要交哪些税
  • 个人出售普通住房个人所得税
  • 收购发票哪一联做帐
  • pavfires.exe - pavfires是什么进程 有什么用
  • 销售使用过的固定资产可以开专票吗
  • 其他债权投资按公允价值计量,为什么计提减值准备知乎
  • zend framework手册
  • 共轭梯度法matlab代码
  • 这是我见过最牛的人英语
  • js防抖节流的区别和使用场景
  • thinkphp codeigniter
  • 合伙企业与公司一样具有高度的人合性
  • css选择上一个兄弟
  • 购买黄金会计分录怎么写
  • sqlserver2008数据库定时备份
  • python计算集合交集并集个数
  • 筹建期购买办公用品
  • 二手车的范围
  • 残保金 滞纳金
  • 一般纳税人购入不动产增值税税率
  • 怎么查询mysql sql_mode
  • sql数据库转换mysql
  • 资产负债表其他应收款包括哪些内容
  • 营业外收入是指企业确认与企业生产经营活动没有
  • 发放福利视同销售进项税要转出吗?
  • 单位租的个人房怎么入账
  • 小规模企业提现到自己个人银行卡需要交多少税
  • 固定资产没有折旧完要转走会计科目
  • 已抵扣进项税额转出的会计分录怎么做
  • 成本发票未到怎么入账
  • 个税速算扣除数2023
  • 什么情况下需要打狂犬疫苗
  • 几个常见的收敛级数
  • 阿里云 mybase
  • MySQL5.6.31 winx64.zip 安装配置教程详解
  • linux中vi编辑器怎么使用
  • linux系统讲解
  • 服务器时间和电脑时间
  • vmware 错误
  • win10的ghost
  • 联想y400装win8
  • 微软宣布将AI引入Office套件
  • big是什么文件格式
  • ubuntu系统应用
  • win7系统笔记本摄像头在哪里打开
  • js判断浏览器是否为ie
  • javascript中的数据类型分为两大类
  • 塔防类的网游
  • angular实战
  • linux Shell获取某目录下所有文件夹的名称
  • vue-cal
  • js实现的简洁二次函数
  • 安卓手机查看sd卡
  • 容易混淆的词汇
  • 国税和地税比例
  • 广东省地方税务局班子成员
  • 企业所得税计算器在线计算
  • 企业年金个人缴费比例越高越好吗
  • 香港买iphone要交多少税
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设