位置: 编程技术 - 正文

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

  • 增值税滞纳金怎么做账
  • 进项税大于销项税结转分录
  • 异地预缴可以退吗
  • 资产负债表里的存货包括哪些科目
  • 非税缴税是什么意思
  • 公章损坏更换的费用怎么记账
  • 电子税务局怎么添加财务负责人
  • 会计凭证辅助项
  • 企业的内部银行
  • 购货方付款会计分录
  • 附加税减征额怎么做分录
  • 销售净水器营业执照范围
  • 工资没走公账走的私人账户合法吗
  • 扣缴义务人怎么删除
  • 企业没有进项发票又开出很多发票
  • 销售退货时发票已认证怎么办
  • 工会经费按什么计算的
  • 自产产品用于捐赠的会计处理
  • 销货清单怎么写才正规
  • 收到抵账车辆无发票
  • 快递快件丢失
  • 母公司收到的分红计入利润吗
  • 销售无形资产增值税纳税义务发生时间
  • 报税显示未进行抄报税
  • 税控盘维护费抵减分录
  • 未认证进项税额转出
  • 上月预付款项 这月开了发票会计分录
  • 空调安装工程如何做
  • 我的初级备考经验怎么写
  • 出售固定资产账务如何处理
  • 专用发票和普通发票的税率
  • 使窗口最小化的快捷键
  • 批量删除 超链接
  • 无法访问windows installer服务,没有正确安装
  • 进程核心栈
  • 如果退货卖家拒绝会把货退回来么
  • php显示文件目录及路径
  • thinkphp d
  • 厂房维修费是制造费用还是管理费用
  • php批量上传图片到服务器
  • 残疾人保证金优惠减免怎么申请退税
  • progress的用法及短语
  • telnet命令大全
  • 应付账款和预付账款的会计分录
  • 使用xampp建立www服务
  • 手机做h5
  • 公司申请破产后员工有赔偿吗
  • 金税四期有什么变化
  • 商业汇票的承兑银行必须具备下列条件
  • 存货核算科目设置
  • 工程材料如何管理
  • 出口额和外汇收入
  • 退货回去需要把原包装保留吗
  • 代扣款分录
  • 租房公司报销发票怎么开
  • 水利基金征收标准
  • 主营业务成本包括哪些
  • 如何判断应当预见
  • 航天信息发票全额抵扣
  • 建账前的准备工作
  • mysql5.7.23
  • 存储过程mysql
  • sql语句相似度计算
  • rtm平台全称
  • dropbox app
  • ubuntu设置关闭按钮在右侧
  • linux忘记密码怎么重启
  • win8触摸板失灵怎么办
  • centos分区命令
  • win8正版系统自带
  • win7系统删除ie浏览器
  • Android游戏开发入门
  • Extjs4 类的定义和扩展实例
  • android:AndroidAnnotations上传文件,网络接口如此简洁
  • script_tool_for_linux.bash: Linux 环境下的 hosts 一键部署脚本
  • unity 加载界面
  • nodejs怎么连接mysql
  • 移动端web开发需要学什么
  • 税务催告期限多久
  • 山东省合格考密码
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设