位置: 编程技术 - 正文

PHP:pg_send_prepare()的用法_PostgreSQL函数

编辑:rootadmin
pg_send_prepare

推荐整理分享PHP:pg_send_prepare()的用法_PostgreSQL函数,希望有所帮助,仅作参考,欢迎阅读内容。

文章相关热门搜索词:,内容如对您有帮助,希望把文章链接给更多的朋友!

(PHP 5 >= 5.1.0)

pg_send_prepare — Sends a request to create a prepared statement with the given parameters, without waiting for completion.

说明 bool pg_send_prepare ( resource $connection , string $stmtname , string $query )

Sends a request to create a prepared statement with the given parameters, without waiting for completion.

This is an asynchronous version of pg_prepare(): it returns TRUE if it was able to dispatch the request, and FALSE if not. After a successful call, call pg_get_result() to determine whether the server successfully created the prepared statement. The function&#;s parameters are handled identically to pg_prepare(). Like pg_prepare(), it will not work on pre-7.4 versions of PostgreSQL.

参数

connection PHP:pg_send_prepare()的用法_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 to give the prepared statement. Must be unique per-connection. If "" is specified, then an unnamed statement is created, overwriting any previously defined unnamed statement.

query

The parameterized SQL statement. Must contain only a single statement. (multiple statements separated by semi-colons are not allowed.) If any parameters are used, they are referred to as $1, $2, etc.

返回值

Returns TRUE on success, FALSE on failure. Use pg_get_result() to determine the query result.

范例

Example #1 Using pg_send_prepare()

<?php$dbconn=pg_connect("dbname=publisher")ordie("Couldnotconnect");//Prepareaqueryforexecutionif(!pg_connection_busy($dbconn)){pg_send_prepare($dbconn,"my_query",'SELECT*FROMshopsWHEREname=$1');$res1=pg_get_result($dbconn);}//Executethepreparedquery.Notethatitisnotnecessarytoescape//thestring"Joe'sWidgets"inanywayif(!pg_connection_busy($dbconn)){pg_send_execute($dbconn,"my_query",array("Joe'sWidgets"));$res2=pg_get_result($dbconn);}//Executethesamepreparedquery,thistimewithadifferentparameterif(!pg_connection_busy($dbconn)){pg_send_execute($dbconn,"my_query",array("ClothesClothesClothes"));$res3=pg_get_result($dbconn);}?>

参见

pg_connect() - 打开一个 PostgreSQL 连接 pg_pconnect() - 打开一个持久的 PostgreSQL 连接 pg_execute() - Sends a request to execute a prepared statement with given parameters, and waits for the result. pg_send_execute() - Sends a request to execute a prepared statement with given parameters, without waiting for the result(s). pg_send_query_params() - Submits a command and separate parameters to the server without waiting for the result(s).

PHP:pg_send_execute()的用法_PostgreSQL函数 pg_send_execute(PHP5=5.1.0)pg_send_executeSendsarequesttoexecuteapreparedstatementwithgivenparameters,withoutwaitingfortheresult(s).说明boolpg_send_execute(resource$connection,string$stmtname,array$

PHP:pg_select()的用法_PostgreSQL函数 pg_select(PHP4=4.3.0,PHP5)pg_select选择记录说明mixedpg_select(resource$connection,string$table_name,array$assoc_array[,int$options=PGSQL_DML_EXEC])pg_select()根据assoc_array数组中的field=v

PHP:pg_result_status()的用法_PostgreSQL函数 pg_result_status(PHP4=4.2.0,PHP5)pg_result_status获得查询结果的状态说明intpg_result_status(resource$result)pg_result_status()返回该查询结果资源的状态。可能的返回值有PGSQ

标签: PHP:pg_send_prepare()的用法_PostgreSQL函数

本文链接地址:https://www.jiuchutong.com/biancheng/281447.html 转载请保留说明!

上一篇:PHP:pg_send_query_params()的用法_PostgreSQL函数

下一篇:PHP:pg_send_execute()的用法_PostgreSQL函数

  • 旅游业成本具体有哪些
  • 代扣代缴通用缴款书怎么打印
  • 利润表本期金额怎么算
  • 预算为负数实际为负数 怎么计算完成率
  • 应收账款平均数
  • 制造费用结转后有没有余额
  • 应收票据质押会计处理
  • 什么企业没有销售费用
  • 汇算清缴补交的所得税怎么记帐
  • 咨询服务费记到什么科目
  • 增值税只有销项没有进项怎么做账
  • 技术开发合同免征企业所得税吗
  • 营改增后还有营业费用吗
  • 购买垃圾袋的会计分录
  • 利税总额为负数如何表述出来
  • etc发票一直不出来
  • 一般纳税人增值税申报表
  • 加油的普票可以抵扣进项税吗
  • 个体户要申报
  • 定期定额自行申报表计税依据
  • 政府奖励资金如何入账
  • 企业支出的辞退补偿金
  • 把桌面文件放到虚拟机
  • 如何在电子税务局添加开票人
  • 关闭固定在任务栏的功能
  • 王者荣耀体验皮肤什么时候结束
  • php新手入门
  • php foreach()
  • ctfmon.exe文件在哪
  • vue trim
  • java date类型
  • json对象和js对象
  • 哪些情况即使取消核酸
  • 计提下月工资怎么算
  • 前端实战面试题
  • 杀疯了出自哪里
  • 命令行 压缩
  • 下脚料收入计入什么科目
  • 网上报税流程演示2019
  • 企业和银行对账多久对一次
  • phpcms怎么用
  • php cms
  • 银行承兑汇票回头背书
  • 个人缴纳社保部分怎么算
  • 购入原材料要交印花税吗
  • 应交税金应交增值税年底转平吗
  • 员工意外伤害险入什么会计科目
  • 水利建设基金申报表哪里
  • 应收账款收不回来
  • 收到返还工会经费大于管理费用
  • 汇算清缴补交的所得税怎么记帐
  • 公司注销后应收账款转给个人
  • 费用支出多了怎么办
  • 成品油经销企业资质
  • 提供劳务收入的确认条件
  • 行政单位维修管理制度
  • 未缴纳或未足额缴纳出资的股东
  • 班车租赁费计入福利费吗
  • Win10预览版桌面图标和任务栏不翼而飞怎么办?
  • hyper-v搭建
  • windows7中个性化设置
  • vmware centos8
  • 怎样一键清空
  • win10registry
  • win10mobile更新出错
  • Win7系统电脑开不开机怎么办
  • windows8.1版本区别
  • [置顶]bilinovel
  • 安卓textview设置文本
  • cmd命令基础
  • Python实现Mysql数据库连接池实例详解
  • linux读出文件
  • android颜色值
  • android圆形按钮
  • pythonglobal用法
  • python django orm
  • 北京交通政务
  • 成品油和非成品油的税务知识
  • 黑龙江省国税局举报电话
  • 苏州吴江区事业单位2023成绩公布
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设