位置: 编程技术 - 正文

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

  • 即征即退需要缴纳税款吗
  • 银行委托贷款上征信吗
  • 发票税率开错了怎么办
  • 其他货币资金的科目编码
  • 法人私户转公户怎么操作
  • 折旧会影响利润表吗
  • 小规模30万免税是含税还是不含税
  • 管理费用劳保费属于
  • 外账成本倒推表格
  • 进口增值税和进项税
  • 应收账款未收到回函的替代程序
  • 固定资产盘盈原因
  • 个人账户作为公司私账
  • 加油站冲值加油怎么操作
  • 企业将存货低价出售处理要如何做会计处理?
  • 劳保用品会计科目是什么
  • 年薪制有什么好处
  • 项目部管理人员及作业人员的
  • 对公账户提取备用金可以每天提现嘛
  • 计算企业所得税的公式
  • 个人所得税福利费免税范围
  • 付款申请需要附什么依据
  • 什么企业不可以开通信保订单服务
  • 我的初级备考经历怎么写
  • 收取施工队管理费
  • 会计准则规定
  • 电脑休眠和睡眠什么差别
  • win7怎么获取管理员
  • 业务招待费税务筹划案例
  • 注册资金没有的怎么做账
  • 记帐凭证由谁填制
  • 库存现金意思
  • php读取opc
  • 出售固定资产减免的税款账务处理
  • pace框架
  • 结转已销售产品的实际生产成本会计分录
  • 语言翻译算法
  • php面向对象优点,缺点
  • 2021劳务分包专票开几个点
  • ios14.5ipad
  • 以固定资产抵债发生的固定资产
  • phpcms二次开发教程
  • 两个城市的社保可以累计吗
  • 当期进项加计额怎么填
  • 预付账款购进原材料怎么做账
  • 个体户定额3万需要申报吗
  • 企业所得税的税收筹划
  • 坏账准备是什么凭证
  • 代扣代缴的增值税额
  • 增值税免抵退税和免退税的区别有什么?
  • 低值易耗品的金额
  • 当月无销售要计提工资吗
  • 公司既没有收入怎么办
  • 搬迁所得
  • 结构性存款怎么计算收益
  • 增值税进项发票抵扣认证流程
  • 非金融企业间借款利息开票税率
  • 利润分配的借方表示增加还是减少
  • mysql 5.7.31安装
  • win8语言栏不见了 怎么调出来
  • windowsandbox
  • iis设置mime
  • Windows Server 2008作为打印服务器排错
  • ubuntu安装transmission
  • 如何升级mac系统到10.12
  • starting windows
  • win7win10双硬盘双系统
  • linux电子邮件
  • win7安全更新kb4534314
  • java 迭代器 remove
  • bat关闭bat
  • 计算字符串的长度的函数
  • android开发范例实战宝典
  • python socketcan
  • 宁波增值税普通发票有几联发票
  • 河南电子发票申请流程
  • 汽车发票含税吗
  • 山西省税务局官网登录
  • 中国进口0号柴油价格
  • 个人所得税的工资比实际的多
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设