位置: 编程技术 - 正文

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

  • 个体工商户需要进项发票吗
  • 采购暂估的处理方式
  • 为临时工购买礼物怎么说
  • 什么情况需要个人档案
  • 个体工商户税种认定
  • 股票价值和内部价值
  • 劳务派遣公司必须设立股东
  • 农民工工资专户管理暂行办法
  • 申报个税的收入是什么收入
  • 专项资金审计的目的
  • 个体户生产经营所得税税率表
  • 营改增的真实目的
  • 免税投资背后的风险,你都清楚吗?
  • 外商投资企业要交房产税吗
  • 劳务服务公司业务范围
  • 固定资产不动产和动产的区别
  • 涉及农业的税收优惠有哪些
  • 向客户发放,赠品怎么写
  • 关联企业纳税调整期限
  • 委托招聘服务费怎么算
  • win11输入法候选字不见了
  • u盘写入扇区错误
  • 公司聚餐计入什么会计科目
  • 企业所得税汇算清缴扣除标准2023
  • 现代服务业包括哪些
  • 如何重装系统win7旗舰版
  • 销货方发票红冲操作流程
  • erl.exe是什么进程
  • winspool.drv病毒
  • 银行手续费未开票汇算清缴要调增吗
  • 定向增发后送股成本价
  • php 读取大excel
  • php定时发送邮件
  • phpbug
  • 公司注销账面实收资本如何处理
  • php file函数
  • PHP strcmp()和strcasecmp()的区别实例
  • discuz手机标准版
  • 研发费用算期间费用吗
  • 车辆过完户保险还能下浮吗
  • 进项税额转出如何做分录
  • 企业所得税如何征收
  • python3矩阵求逆
  • c标准库pdf下载
  • 收到增值税收入423300,款项已存入国库
  • datatable怎么用
  • 京东开专用发票需要用公户付款吗?
  • 应交企业所得税是什么科目
  • 个人补缴的医保有钱返吗
  • 新建厂房费用可以直接计入管理费用么
  • 收到多收的款会计处理
  • 赠品视同销售价格如何确定?
  • 如何计算税前工资
  • 外购货物会计分录
  • 什么情况需要预缴
  • 购买农产品进行销售要交税吗
  • 去年的会计凭证做错了,今年发现要怎么修改
  • 采取分期收款方式
  • 租赁办公楼
  • mysql格式化日期yyyy/mm/dd
  • bios设置电脑定时启动
  • win7 64位系统如何查看计算机名称为了应付某一操作
  • win10小娜语音激活
  • /wlan direct
  • 魔方u怎么弄
  • win10回收站文件在哪里
  • win7系统无法安装ie8
  • 移动宽带解绑怎么办理
  • ubuntu安装指南
  • win8.1最流畅
  • python如何搭建环境
  • unity3D游戏开发
  • 下面有关js中call和apply的描述,错误的是
  • cocos lua调试
  • javascript取随机数
  • jquery编写Tab选项卡滚动导航切换特效
  • android view view
  • 入职培训结束就签合同吗
  • 单位纳税人什么意思
  • 新公司办理发票税控机流程?
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设