位置: 编程技术 - 正文

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)

  • 收到待报解预算收入怎么查退的什么税
  • 小企业会计准则下退企税分录
  • 印花税退税减半征收会计分录怎么写?
  • 制造业税负率怎么计算
  • 大巴车怎么进行营运
  • 什么时候过路费是半价
  • 财务报表分析五种方法
  • 支付给个人的佣金怎么做账务处理
  • 建筑企业建安税是多少
  • 预收账款发货
  • 不动产租赁异地预缴需要携带什么
  • 机票上的exemptcny这个是什么意思?
  • 餐费适用税率
  • 国家税务总局2016年公告
  • 销售类合同审核要点
  • 资产评估溢价部分如何处理?
  • 钢结构施工速度快吗
  • 个人银行卡流水达到多少要交税
  • 政策性减免单位社保
  • win10应用商店变成英文怎么改成中文
  • 会计的职责概述
  • 贷款利率计算公式表格
  • 农业公司的会计分录
  • win10开始菜单失效如何解决
  • 公司有长期挂账的权利吗
  • 退货发票会作废吗
  • 财务新手要注意哪些事项
  • mac如何打开蓝牙
  • root怎么开oppo
  • 建筑企业安装费计入什么科目
  • php数据迁移
  • 电子缴款凭证能代替完税证明吗
  • 金融负债期末可以转出吗
  • 因汇率变动而导致的损失属于
  • 预处理数据的方法
  • deepsort 跟踪
  • 股东转让股份会退股吗
  • 工会经费,残保金,会计分录
  • 社会保险基数怎么办
  • 个人以不动产投资成立一人有限公司
  • 购进固定资产的进项税计入成本吗
  • 公司安排异地培训
  • 长期借款期末余额表示什么
  • 差旅费计入工资合理吗
  • 给员工购买住房公积金是先办卡吗?
  • 库存现金怎么算
  • 增值税税控系统专用设备费及技术维护费抵扣
  • 人工费用计入
  • 增值税销项税额抵减账务处理
  • 公司收到待报解预算收入在哪里查具体情况
  • 行程单入账多久钱能到账
  • 所得税费用如何计提分录
  • 收到赠送的样品附件
  • 销项税和进项税的区别
  • 教育行业的成本怎么做账
  • 公司发放员工工资不走账
  • 会计处理是会计分录吗
  • windows installation disc
  • cf游戏初始化失败是因为什么
  • ubuntu系统怎么用
  • windows自带搜索引擎
  • win10 11月累计补丁KB3097877更新后导致应用崩溃该怎么办?
  • win7更改电脑设置在哪里
  • 微软内测
  • linux 命令连接
  • js动态表格可修改表格数据
  • 批量替换在哪
  • unicode和utf–8 编码
  • css网站布局实录 pdf
  • javascript例子
  • nodejs连接sqlserver数据库
  • 使用forever管理nodejs应用教程
  • jquery父节点
  • vue 全局状态
  • jquery可以实现哪些效果
  • unity3d 使用Quaternion 类实现两个简单功能
  • 如何在电子税务局添加办税人员
  • 卷烟批发环节的消费税
  • 建筑企业要交哪几项环保税
  • 全国征兵网官网报名
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设