位置: 编程技术 - 正文

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

  • 公司给员工代办失业证
  • 什么是进项税额转出
  • 私立幼儿园需要纳税吗
  • 纳税申报操作视频
  • 股权转让需要缴纳企业所得税吗
  • 计提税费表格
  • 税金及附加可以为负数吗
  • 增值税多提了怎么处理
  • 累计纳税工资是什么意思
  • 出口退税进项发票认证勾选
  • 利润表营业外收入怎么取数
  • 公司支付佣金给个人合法吗
  • 个人设备投资需要交税吗
  • 滞留票的处理
  • 周转材料核算科目是什么
  • 小微企业营业外收入税率是多少
  • 工企业用地土地使用税怎么征收?
  • 汇算清缴前取得暂估发票
  • 船舶吨税范围
  • 小规模纳税人附加税税率各是多少
  • 未盖发票章怎么办
  • 小规模不动产销售不动产怎么交税
  • 无偿划拨的资产怎么做资产卡片账簿
  • 金融企业呆账准备金是否允许补提
  • 每月物业费怎么计算公式
  • 资产评估入账的评估报告
  • 期初未缴税额和期末未缴税额
  • 个体户生产经营所得税率表2023
  • 现金折扣通过财务费用核算
  • 投资性房地产的后续计量从成本模式转为公允价值模式的
  • intelin
  • linux开启
  • 转让无形资产的所有权计入什么科目
  • win10右键新建卡死
  • 无形资产的确认与计量
  • 虚假财务报表的法律后果
  • oeloader.exe - oeloader是什么进程 有什么用
  • 最快的网络传输速率
  • Http请求-hutool工具类的使用
  • 已认证留抵待抵扣税额分录
  • 运输公司的账务处理
  • 会计政策变更属于经营情况变化吗
  • 工伤报销入账
  • php操作oracle
  • 基于Selenium的自动化测试平台设计与实现
  • dedecms官网
  • 帝国cms使用手册
  • 公司注销后如何追缴税款
  • 织梦使用教程
  • 退预收款需要对账吗
  • 实行核定征收印花税
  • 一般计税预缴增值税2%怎么算
  • 购买固定资产会计凭证
  • 公户里的钱可以随便转出嘛
  • 专票已认证但又不能抵扣
  • 已抵扣的增值税怎么做账
  • 客户手续费率
  • 车船税缴纳后有发票吗
  • 小规模30万含专票吗
  • 农产品计算抵扣税率 最新
  • 以前年度多计提的税金怎么调整
  • 怎样把有余额的钱取出来
  • win8系统升级到win 10
  • linux进入操作系统
  • solaris ssh offline
  • linux中sed详细用法
  • gnaupdaemon.exe是什么
  • win7找回删除的文件
  • ES6 javascript中class静态方法、属性与实例属性用法示例
  • quick-lua touch 触摸事件
  • unity5.4.0
  • jquery获取指定元素
  • python语言解析
  • jquery获取当前日期yyyymmdd
  • 1.6排量算大吗
  • 残疾人买车可以减免购置税吗
  • 江苏省税务局电子发票
  • 骗取国家出口退税罪
  • 福建福州有几个火车站
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设