位置: 编程技术 - 正文

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

  • 公司利润提取如果避税怎么做会计分录?
  • 车辆保险费印花税目
  • 事业单位资产负责比往年增加表明什么
  • 已核销的坏账又收回会计分录
  • 会计做账借贷怎么做
  • 股东投入资金大,但不想成为法人
  • 外商投资企业与内资合资是国企吗
  • 公租房租金收入什么科目
  • 事业单位如何计提工资
  • 被列为经营异常名录有什么影响
  • 用于在建工程的贷款利息
  • 进口关税退税计入什么科目
  • 未结清全额是逾期吗
  • 劳务报酬个人所得税怎么计算
  • 预缴所得税需要结转吗
  • 社保不报的情况下保险报销吗
  • 滞纳金入什么会计科目
  • 残保金逾期未申报的税务怎么处理
  • 合伙企业对外投资
  • mac死机什么原因
  • 鸿蒙系统开发人员选项
  • 简易计税的方式
  • 转出的进项税额是加还是减
  • 旅游公司广告费支出扣除标准
  • php文件可包含哪三部分代码
  • wifi安全助手每日提现
  • php技巧
  • 预提土增税账务处理
  • uni-app 怎么实现页面不跳转依旧可以传数据
  • 圣何塞在哪
  • yii2项目实战之restful api授权验证详解
  • php分页查询的简称是什么
  • vuex五个核心概念
  • 金蝶存货核算不能结账,能强制结账吗
  • 淘宝天猫开票是普票还是专票
  • python怎么过滤多余空格
  • 租赁收入会计分录怎么做
  • 未分配利润与净利润有关系吗
  • 核定征收企业所得税应税所得率
  • 增值税是否计入在建工程
  • 预收账款是什么要素
  • 预收账款是负债还是资产
  • 长期预付账款涉税
  • 非居民企业所得税征收方式鉴定表
  • 加油充值卡开票内容是什么
  • 报销单可以当记账凭证吗
  • 贷款收取服务费
  • 电子记录表怎么填写
  • 没有取得增值税发票
  • 社保费申报是当月的
  • 小规模纳税人开专票需要交税吗
  • 建筑简易征收适用哪些业务
  • 收到红字发票进项税怎么做账务处理
  • 可抵扣的税票
  • 清产核资评估报告
  • sql触发器使用存储过程
  • Win10 Mobile RS2预览版14943上手视频曝光
  • 手机用xp系统
  • shwiconem.exe - shwiconem是什么进程 有什么用
  • win10任务界面
  • linux ssh安装包
  • win7旗舰版系统激活密钥
  • win7 运行慢
  • opengl绘制球面
  • Begin OpenGL with Python-1st Day,draw a simple sample.
  • Javascript call和apply区别及使用方法
  • jQuery插件能输出到控制台
  • nodejs跳转到指定页面
  • shell字符串操作命令
  • Python连接access数据库
  • ajax简单实例
  • javascript产生随机整数随机性强
  • python连接mq
  • Javascript字符串奇数位替换
  • 河南省医保网上报销流程
  • 安徽国家税务局增值税发票查询平台
  • 税务局风险评估是什么意思
  • 企业填写莞e申报的通知
  • 增值税差额征税什么意思
  • 个人所得税的通知
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设