位置: 编程技术 - 正文

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

  • 商场购物卡的会员怎么用
  • 哪些准备金支出可实现税前扣除?
  • 非金银首饰以旧换新增值税
  • 电子普通发票和纸质普通发票一样吗
  • 税法有哪些构成要素及各要素之间有何关系
  • 快递公司快递人员工资记入什么会计科目
  • 不同月份的发票能抵扣吗
  • 临时人员劳务费有哪些?
  • 增值税免缴
  • 政府非税收入的种类
  • 建筑企业购进免税苗木1000元
  • 小企业会计准则以前年度损益调整
  • 外贸企业出口销售通常采用
  • 旅游费用可以报销吗
  • 以旧换新帐务处理
  • 仓储企业的成本有哪些
  • 签了合同后又要收额外费用
  • 收到赞助费如何做分录
  • 实收资本不到账如何做凭证
  • 手撕票可以报销么
  • 退税勾选后怎么申报
  • 资产损失税前扣除备查资料
  • 建筑企业预交增值税问题尚未得到解决
  • 外购固定资产如何入账
  • 劳动生产总值计算公式.doc
  • 发票一定要开完了才能领取吗?
  • 企业投资股票取什么名字
  • 支付工程款会计处理
  • 路由器管家怎么登录
  • 所有者权益变动表图片
  • 筹建期固定资产是否要折旧
  • 未开票收入跨年开票
  • 公司资产转让要交多少税
  • php调用图片
  • 应纳税所得税计算公式
  • 以固定资产换入无形资产
  • 增值税账务处理 一般纳税人
  • 日出时的麦克拱岩,俄勒冈南海岸 (© Dennis Frates/Alamy)
  • 持有至到期投资减值准备
  • js实现拖拽选区的功能
  • php自加
  • 社会团体账务处理流程举例
  • lvresize命令
  • 怎么买好空调
  • 学电脑哪个网站比较好
  • 工人意外伤害保险
  • 出口退税转内销的损失
  • 怎么修改申报数据
  • 业务招待费的列支
  • 广告赞助支出可以抵税吗
  • 长期应收款的主要类型
  • 债务资本的税后成本和税后债务成本
  • 员工缴纳工伤保险怎么赔偿
  • 公司定额征收需要什么
  • 发票红冲重新开具怎么做分录
  • 会计凭证中转是什么
  • 企业如何建账之类的账目
  • MySQL主从同步原理介绍
  • 常用的sql语句有哪些
  • ubuntu18.04更新到20.04
  • centos7添加ip地址
  • linux 挂载img
  • 电脑太慢了怎么解决
  • centos安装yun
  • win7网络正常网页打不开是什么原因
  • win7开机显示一堆英文
  • linux 内存文件夹
  • cocos2d-x2.2.3和android平台环境的搭建
  • android开发环境是什么
  • 显示打包成功但是没有文件
  • jquery validate
  • shell脚本语句
  • cmd for /f
  • 基于javascript的毕业设计
  • 谈谈我对美国的印象
  • jQuery给div,Span, a ,button, radio 赋值与取值
  • 《javascript高级程序设计》
  • 深圳龙华街道办电话
  • 税务局要求补上年房租开票
  • 北京重点税源直报平台登录
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设