位置: 编程技术 - 正文

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

  • 建筑业增值税税额怎么算
  • 公司给员工租的宿舍怎么交税
  • 有形动产租赁服务属于现代服务吗
  • 开淘宝店怎么做账
  • 小卖部的货源怎样提供的
  • 小规模纳税人免征增值税政策
  • 房地产开发企业的土地使用权计入哪里
  • 个人给公司开税票有没有影响
  • 影响固定资产折旧的基本因素
  • 企业固定资产没提折旧怎么办
  • 销售边角料计入什么科目
  • 交易或事项对会计等式的影响表格怎么填
  • 水电费没有票怎么做账
  • 建筑行业异地预缴
  • 个人所得税变动率计算公式为多少
  • 保险合同有啥用
  • 固定资产差额
  • 公司必须购买税控设备吗
  • 税务要求企业所得税预缴申报更正
  • 公司收到纸质承兑不开票行吗
  • 给研发人员福利怎么做账
  • 企业费用抵扣
  • 公积金提取条件
  • 发票未到的费用怎么处理
  • win10玩游戏时弹出error
  • 2021年6月更新
  • window的hosts文件
  • 制药厂副产品
  • 筹建期间费用计入什么
  • 事业单位接受捐赠固定资产入账
  • php system函数的用法
  • win7系统任务计划在哪里
  • 原材料因管理不善发生毁损
  • 增值税发票作废了税钱退还吗
  • 外购产品会计分录
  • 回迁房会被收回吗
  • 分享项目成果
  • opencv几何变换
  • 分公司需要交所得税吗
  • 种植中药材公司取名字大全
  • 国有土地租赁合同的性质
  • 企业租赁厂房需要交什么税
  • 收回以前年度多发奖金分录
  • 小规模纳税企业销售货物或者提供应税劳务
  • 购买防暑物资应放到哪个科目
  • 应交税费的明细账怎么登记
  • 车间购买的设备怎么记账
  • 印花税步骤
  • 用友t3怎样设置权限
  • win7系统安装教程不用u盘
  • 固定资产一次性计入费用的账务处理
  • 研究费用怎么做账
  • 买车的车
  • 一次性收取一年的租金如何做分录
  • 差旅费借记什么科目
  • 资产负债表编制
  • 备查账包括哪些
  • 企业短期借款可以是个人吗
  • Mysql inner join on的用法实例(必看)
  • win8.1升级win10系统
  • Windows Server 2008虚拟技术说明
  • windows7自动开机脚本文件
  • u盘安装mac系统
  • windows系统后台不显示QQ等软件(任务栏右侧不显示QQ图标)
  • 电脑迅雷影音在哪个文件夹
  • WIN7系统屏幕亮度哪里设置
  • js调用音频文件
  • eclipse 单词
  • perl-v
  • android数据库使用
  • shell脚本用法
  • unity3d速成
  • sql命令语句
  • shell脚本-p
  • [置顶] 转载自官方-unity5.0正式发布了,看看带来哪些重要的新特性!
  • javascript标签大全
  • 如何税务监管更精准
  • 云南省国家税务局网上办税服务厅
  • 国家规定的免税项目
  • 税务局工作业绩
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设