位置: 编程技术 - 正文

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)

  • 个人独资企业是有限责任还是无限责任
  • 其他收益科目在哪个科目前面填
  • 股份制改造而发生的资产评估增值税法规定
  • 采购设备包含安装费用吗
  • 销售退回的增值税怎么处理
  • 高速公路通行费发票可以抵扣增值税吗
  • 股票投资会计科目
  • 待摊费用的金额
  • 为什么利润表的财务费用与利息费用逻辑不对
  • 购买户外用品的app
  • 设备租赁费开票属于哪个大类
  • 税控盘抵税申报表如何撤销
  • 精装房不同合同的区别
  • 个人所得税成本费用包括哪些
  • 作废发票如何管理
  • 财务部门固定资产修理费计入什么科目
  • 发票上月开本月到账要交企业所得税吗?
  • 增值税包括土地整治收入吗
  • 10万以下免征增值税 文件
  • 补缴纳以前年度企业所得税税率如何论定
  • 如何更改windows用户名
  • 债权转增资本的条件
  • pavmail.exe - pavmail进程是什么文件 有什么用
  • 如何修复win10开机转圈五分钟
  • 期房怎么交易流程
  • 销售费用的作用
  • 增值税发票要审核成功才能开吗
  • 父子之间房屋赠与费用
  • 拍卖有抵押的车子怎么处理
  • laravel基础
  • 狮子岩斯里兰卡
  • 偿还债券本金和利息
  • 申报表中的免税销售额是收入吗
  • Python中如何定义一个变量
  • 办公室清洁费计算公式
  • 每季度报税什么意思
  • 子公司分公司和办事处账务上的区别有哪些
  • 信用减值损失科目借贷方向
  • 国际货运代理公司个人货物
  • 纳税人识别号是不是税号
  • 其他应收款的审定表怎么填
  • 个税申报中本人扣除比例什么意思
  • 公司能经营烟草公司吗
  • 在与sqlserver建立连接时出现
  • mysql 索引 key
  • 2023年会计继续教育报名入口
  • 未达起征点免税额怎么计算
  • 平均资产总额与资产总额的关系
  • 同级财政和本级财政
  • 零余额账户用款额度是什么意思
  • 个人生产经营所得
  • 样板房装修可以住人吗
  • 银行存款支付投资者投入的款项54万
  • 固定资产清理不及时
  • 摊销费用如何做账
  • 融资租赁的服务费是什么票
  • 计提工资申报个税
  • 出口退税勾选后电子税务局查不到发票
  • 进口货物的库存商品金额依据
  • mysql必知必会读书心得
  • freebsd12安装
  • windows虚拟内存转移有什么危害
  • office技术预览版和增强版
  • win10重大更新
  • linux中的用户管理主要涉及用户账号文件
  • 怎么关闭windows登录密码
  • linux 配置中文
  • centos7.6忘记密码了怎么办
  • linux命令行怎么用
  • linux bzz
  • cocos jsc
  • 电子词典笔哪个品牌好
  • JavaScript中OnLoad几种使用方法
  • js设计模型
  • android开发主要用什么语言
  • jquery增加一行和删除
  • 小规模现代服务的税率是多少啊怎么算
  • 精神残疾人员是残疾人吗
  • 地税滞纳金如何做账
  • 契税有发票吗,还是纳税证明
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设