位置: 编程技术 - 正文

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

  • 进项税转出包括什么
  • 预提费用
  • 二手车没有发票能过户吗
  • 内账采购含税怎么转不含税
  • 往期附加税申报错误更正后怎么退税
  • 基本户购买支票需要什么
  • 地下车位未使用 要交物业服务费
  • 进口货物需要交哪些税
  • 有哪些发票可以开成餐饮服务
  • 银行承兑汇票怎么填写
  • 事业单位经营结余贷方转入哪里
  • 免税农产品如何填报企业所得税季报
  • 当月忘记暂估怎么办
  • 小规模纳税人与注册资金有关系吗
  • 增值税专票5%税率
  • 领购纳税人状态注销或转非日期什么意思
  • 增值税减免税款科目怎么结转
  • 企业出租屋顶不需要缴税!
  • 企业所得税多交了必须退税吗
  • 增值税专用发票使用规定 最新
  • 企业的其他业务是什么
  • 土地增值税属于什么税类
  • 光纤熔接发票属什么类别
  • 简易计税增值税计入什么科目
  • 长期待摊费用的内容和特征
  • 收到对方公司的货款怎么记账
  • 股东大会的召集有权
  • 西方会计要素有哪些
  • php字符串赋值
  • 确认收入的必要条件
  • 解决办法总比困难多
  • 财务管理集权与分权
  • 哥本哈根的地形
  • 编制合并报表的母子公司是什么主体
  • 现金流量表的编报时间有
  • php 上传文件
  • 实现扩展功能的快捷键
  • 微信网页授权管理在哪里
  • 集合框架有何好处
  • 深究Python中的asyncio库-线程并发函数
  • 退回的货款应该记什么费用
  • 关于非营利组织企业所得税免税收入问题的通知
  • 什么是企业的应付账款
  • 外贸退税是算利率吗
  • mongodb用法
  • 企业哪些支出可以用现金支付
  • 工程发票多少点
  • 跨省市提供建筑服务
  • 网上申报纳税注销流程
  • 企业发生的各项融资费用中,不属于借款费用
  • 超市购物小票可以入账吗
  • 建行e信通贴现高不高
  • 处置存货损失应该放哪个科目
  • 建账试算平衡
  • 会计凭证装订的心得体会
  • 终端运行mysql
  • mysql5.7.19 zip 详细安装过程和配置
  • SQL Server提示"选定的用户拥有对象,所以无法除去该用户”
  • sql2000卸载干净
  • mysql根据另一张表更新
  • windows8.1大小
  • hyper-v是啥
  • 电脑预读文件
  • win7能不能安装vs2019
  • win10通讯设置在哪
  • Win7如何开启蓝牙
  • win8正版系统自带
  • unity自动攻击
  • opengl教程48讲
  • three.js gui
  • 变量选择lasso
  • 一个简单的灵魂
  • perl中\s+
  • jqueryui
  • javascript的
  • javascript面向对象精要pdf
  • js封装是什么意思
  • 临沂国税地税局领导班子
  • 国家税务总局深圳税局
  • 80491232税务申报代码
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设