位置: 编程技术 - 正文

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)

  • 银行电子回单有没有法律效应
  • 增值税留抵税额账务处理
  • 全国税务师官网报名
  • 异地预缴税款不交可以吗
  • 外购商品赠送怎么做账
  • 烟丝是消费税的征收范围
  • 外经证核销反馈表
  • 兼职工资直接入公司账户
  • 增值税即征即退收入要交企业所得税吗
  • 政府补贴项目申报流程
  • 出口退税退的是进口时的税吗
  • 企业多缴纳所得税怎么办
  • 应付账款扣款怎么做账
  • 利润表要怎么看
  • 小规模都纳什么税
  • 有产权车位转让需要什么手续和费用
  • 电商确认收货
  • 合并报表收费
  • 增值税以前年度损益调整
  • 单位自办食堂为单位职工提供餐饮服务要交增值税吗
  • 定期结汇会计分录?
  • 鸿蒙负一屏怎么设置
  • 企业债券和公司债券
  • 研发费用加计扣除
  • 4芯网线插线顺序图
  • php数组可以使用哪些键名
  • 代扣代缴的增值税算进项税吗
  • 公司帮员工买社保能扣税吗
  • 耕地开垦费计入土地成本吗
  • 银行存款日记账与银行对账单之间的核对属于
  • 退税的项目有哪些
  • php exit绕过
  • 公司向股东借的钱怎么还
  • 财务费用为什么是负数表示
  • 购买税盘的服务费全额抵扣怎么操作
  • openai创始人阿尔特曼 取向
  • 有哪些天气软件
  • 大前端需要掌握什么技能
  • 图像融合名词解释
  • php代码用什么工具
  • vue.3
  • 电赛2021题目
  • 住宿费可以抵扣进项吗
  • 补交地税多少钱
  • 初识SQLITE3数据库
  • 收入成本怎么做账
  • 扣供应商货款怎么入账
  • 差旅费 包括
  • db2运维命令
  • 增值税发票跨月可以作废吗
  • 进项票未认证就申报抵扣
  • 工程量应当按照什么计算
  • 往来核算是指会计核算中的资金往来业务
  • 当月已付款, 没收到发票怎么做账
  • 资产负债表税务局能看到吗
  • 销售净利率的范围
  • 税收返还如何做账
  • 年终建账于年初建账,在录入期初余额时有什么不一样?
  • centos虚拟机怎么用
  • SQL Server Table中XML列的操作代码
  • mysql实时监控工具
  • xp系统英文版怎么改成中文
  • dos破解密码输入什么
  • 电脑开机时出现红色三角形
  • win10一年更新几次
  • 华硕和联想笔记本电脑哪个好点
  • linux编译安装php扩展
  • opengl编程宝典
  • 写出perl中最常见4种控制流
  • javascript教程完整版
  • html lang属性
  • Unity3D WebCamTexture 调用外部摄像头
  • js中如何弹出提示框
  • JavaScript定义变量
  • android:theme="@style/apptheme"
  • “python”
  • 视频号带货个人和个体工商户的区别
  • 3.0排量 车船税
  • 税务局冬季作息时间
  • 股权转让所得怎么计算个税
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设