位置: 编程技术 - 正文

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)

  • 社保由税务局统一征收的地区
  • 购买办公用品合同模板免费
  • 增值税专用发票使用规定 最新
  • 简易计税方法和免税该怎么选择
  • 机械设备买回来怎么消毒
  • 未达起征点销售额怎么填申报表
  • 房产税房产原值包括地价吗
  • 跨年确认收入税务风险
  • 公益性捐赠支出属于营业外支出吗
  • 简易征收纳税的税率为多少?
  • 汇款后又退回来是什么原因
  • 个人所得税中的股息红利应纳税额
  • 印刷配件有哪些
  • 农副产品收购发票申请
  • 没有核定税种怎么报税
  • 空调安装费税率是6%
  • 最近偷税女星都有谁
  • 租赁物丢失如何赔偿
  • 付款信息和开票信息区别
  • 建筑业简易计税税率
  • 资本化利息支出是什么意思
  • 软件行业的收入怎么样
  • 增值税小规模纳税人免征增值税政策
  • php循环语句
  • 更新kb4584229
  • 重装win7系统鼠标键盘没反应
  • win7旗舰版系统鼠标不能动了
  • ipad哪款最贵
  • 怎么核算购进商品
  • 收到专利补贴的分录
  • vue3+element-plus Dialog对话框的使用 与 setup 写法的使用
  • 数字马力前端笔试题rgb
  • 河马是站在睡觉吗
  • 土地增值税的计算
  • 土地使用税计入管理费用还是税金及附加
  • 费用冲账的会计分录
  • php操作mysql数据库
  • echarts y轴设置
  • 小规模纳税人涉税会计分录是哪几个科目
  • 企业基本户是对公账户吗
  • 购买火车票报销,实际没乘车能查到嘛
  • 暂估成本账务处理办法
  • 可供出售金融资产名词解释
  • 记账凭证摘要的填制要求
  • 湖南残保金优惠政策
  • 企业预缴增值税税率
  • 加油预付卡发票新规定文件
  • 固定资产领用原因
  • 教育类退费
  • 公司场地租赁交什么税
  • 原材料入库单应根据采购订单还是到货数量
  • win8系统忘记电脑开机密码怎么办
  • win10预览版退回正式版
  • xp系统 控制面板
  • win edge
  • 无法安装osx
  • ubuntu开发板
  • linux打包压缩文件的命令
  • 强制升级win11后果
  • cocos2dx官方教程
  • unity如何合并物体
  • javascript的代码
  • 用python三角形
  • 人工智能最受欢迎的一门编程语言
  • jquery给表格赋值
  • 如何搭建node服务器
  • js的继承方式
  • unity3d操作
  • jquery选择器实例
  • unity效率
  • unity灯光闪烁效果
  • jQuery中Ajax全局事件引用方式及各个事件(全局/局部)执行顺序
  • 文化事业建设费是什么税
  • 个人进口关税税率
  • 2021年河南省企业退休职工丧葬抚恤金标准
  • 发票机怎么测试打印
  • 怎么删除天眼查的判决文书
  • 税收收入弹性值
  • 攸县丧葬
  • 成都国税工勤人员待遇
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设