位置: 编程技术 - 正文

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)

  • 租入房租装修费摊销
  • 低值易耗品包含什么
  • 土地增值税预征率
  • 外汇结款怎么办理
  • 代扣代缴的增值税怎么做账
  • 企业销售货物收入没有银行流水
  • 企业所得税税前扣除政策
  • 过期没有进行申报印花税会怎样
  • 增值税普通发票几个点
  • 住宿费的普通发票怎么开
  • 增值税普通发票有什么用
  • 糖类计算公式
  • 折旧费和摊销费怎么算
  • 吊车租赁费计入什么会计科目
  • 出口企业免抵增值税
  • 汽车销售公司买车后续维修保养
  • 个体户税务申报流程季度0申报
  • 测试账户收入怎么做
  • 建筑行业项目部会计要做什么
  • 财务转账一般多久到账
  • 贴息收据税前扣除是什么
  • 公司名下的车怎么上牌
  • 王者荣耀中吕布的克星
  • 公司个人股份转让需要缴税吗
  • 半成品核算工作步骤及要求
  • 新固定资产的六大类型
  • 电脑中毒了怎么弄
  • hpdskflt.sys
  • php验证码识别
  • 存货核算方法可以变更吗
  • code alignment
  • php接口验证
  • php测验
  • 模型训练的过程是什么过程
  • 解压包的命令
  • 资产负债表上应付账款是负数
  • 金融资产的转换
  • 代发工资的账务处理需要什么资料
  • poi java 导入导出
  • 帝国cms8.0
  • 数据库 sql优化
  • 服务费的开票项目是什么
  • 管理费用如何填列
  • sqlserver存储过程返回多个结果集
  • 纺织品业务
  • 小规模纳税人的增值税怎么算
  • 增值税期末有留抵税额应该怎么结转
  • 已认证的红字发票怎么开
  • 对方多开票怎么处理
  • 异地房产税如何收
  • 上年度漏提折旧
  • 法人借给公司钱怎么写情况说明
  • 装修公司购买材料,工程施工账务处理会计分录
  • 存货科目包括哪几类
  • 代理记账公司都是假账么
  • 年终建账于年初建账,在录入期初余额时有什么不一样?
  • 工业企业应收账款减少原因分析
  • sql server 快照
  • sqlserver合并脚本工具
  • xbox无法连接无线网络
  • 预览pdf文件
  • 企业级路由器和普通路由器区别
  • win7用户账户控制设置电脑重启后恢复
  • win10更新中重启会怎么样
  • win10系统玩英雄联盟可以吗
  • middle html
  • 捉虫趣事作文200字
  • nodejs链接mysql
  • js数组洗牌
  • 批处理应用实例
  • socket python
  • shell脚本编程实例
  • JavaScript中的变量名不区分大小写
  • python去掉末尾的换行符
  • wpf 设置鼠标样式
  • python 代码缩进
  • 耕地建仓库属于违规
  • 预约怎么缴费
  • 关于农村养殖和环保规定解资料
  • 增值税发票报税流程
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设