位置: 编程技术 - 正文

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函数

  • 企业避税和逃税的关系
  • 接受投资专利技术科目
  • 子公司之间资产划拨会计处理
  • 出口专用发票应在哪里开
  • 增值税专用发票可以开电子发票吗
  • 企业所得税汇算清缴申报表
  • 应交税金及附加包括哪些
  • 银行 收美金
  • 营业执照的注册地址怎么填
  • 物业费增值税是什么税
  • 公司开租房发票,税钱由公司承担
  • 金税盘费用如何抵扣
  • 资产基金科目如何选择
  • 计提福利费会计科目
  • 第三方要求
  • 企业间利息增值税率
  • 工程安装人工外包合同怎么写
  • 成本票要交税吗
  • u盘无法格式化为NTFS
  • 应收账款转让分录
  • 库存股属于什么项目
  • 债务重组法律服务方案
  • 专项资金下达期限
  • To install them, you can run: npm install --save core-js/modules/es.array.push.js
  • php如何提高程序运行效率
  • 企业工资薪金和职工福利费等支出税前扣除问题的公告
  • 柬埔寨 吴哥窟
  • 跨行政区域是跨省吗
  • 国有土地租赁合同规定多少年
  • stable diffusion webul
  • 阿里云盘 icloud
  • 数组 php
  • ajax提交表单数据
  • 账载折旧金额填哪个数
  • 公司开的餐费专票可以抵扣吗
  • 商贸公司库存怎么盘点准确一点儿
  • 个人独资公司和合伙公司有什么区别
  • 销售后返现怎么算
  • 以摊余成本计量的金融资产会计处理
  • 销售时的赠品怎么做账
  • 分页 php
  • 电脑管理费用入什么账户
  • 医用耗材税率是多少
  • sqlserver存储过程在哪里
  • 用sql语言
  • 资产减值准备的举例
  • 跨年发票分录
  • 加盟代理需要什么手续
  • 第三方平台佣金账务处理
  • 进口货物会计处理举例
  • 非正常损失进项税额转出怎么计算
  • 主营业务成本带二级科目吗
  • 连锁店的总部取名
  • 税盘不缴费会怎么样
  • 管家婆里面的记账凭证怎么做?
  • 企业股权无偿转让
  • 车子租赁费开什么发票?多少税
  • 企业出售投资性房地产应按照售价与账面价值
  • 企业如何计算增值税
  • 建筑公司直接把钱打到个人账户怎么走账
  • 原材料会计科目
  • sql注入修补方法
  • 阿里云 centos7 替换
  • 微软推出windows1
  • win10磁盘占用100%卡死
  • 浅谈特殊儿童的融合教育论文
  • cocos2dx如何通过Image获取指定点颜色值
  • jquery实战
  • js中的冒泡排序原理
  • ecmascript6 官方文档
  • 用jQuery的AJax实现异步访问、异步加载
  • bootstrap 按钮
  • js弹出提示窗口
  • 浅谈 javascript 事件处理
  • javascript编程基础
  • android界面设计规范
  • 陕西省国家税务总局班子成员
  • 佛山顺德怎么坐地铁到广州
  • 税务执法审批表审批部门
  • 北京朝阳区电话区号是多少?
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设