位置: 编程技术 - 正文

PHP:pg_send_execute()的用法_PostgreSQL函数

编辑:rootadmin
pg_send_execute

推荐整理分享PHP:pg_send_execute()的用法_PostgreSQL函数,希望有所帮助,仅作参考,欢迎阅读内容。

文章相关热门搜索词:,内容如对您有帮助,希望把文章链接给更多的朋友!

(PHP 5 >= 5.1.0)

pg_send_execute — Sends a request to execute a prepared statement with given parameters, without waiting for the result(s).

说明 bool pg_send_execute ( resource $connection , string $stmtname , array $params )

Sends a request to execute a prepared statement with given parameters, without waiting for the result(s).

This is similar to pg_send_query_params(), but the command to be executed is specified by naming a previously-prepared statement, instead of giving a query string. The function&#;s parameters are handled identically to pg_execute(). Like pg_execute(), it will not work on pre-7.4 versions of PostgreSQL.

参数

connection PHP:pg_send_execute()的用法_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 of the prepared statement to execute. if "" is specified, then the unnamed statement is executed. The name must have been previously prepared using pg_prepare(), pg_send_prepare() or a PREPARE SQL command.

params

An array of parameter values to substitute for the $1, $2, etc. placeholders in the original prepared query string. The number of elements in the array must match the number of placeholders.

返回值

Returns TRUE on success, FALSE on failure. Use pg_get_result() to determine the query result.

范例

Example #1 Using pg_send_execute()

<?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_prepare() - Submits a request to create a prepared statement with the given parameters, and waits for completion. pg_send_prepare() - Sends a request to create a prepared statement with the given parameters, without waiting for completion. pg_execute() - Sends a request to execute a prepared statement with given parameters, and waits for the result.

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_result_seek()的用法_PostgreSQL函数 pg_result_seek(PHP4=4.3.0,PHP5)pg_result_seek在结果资源中设定内部行偏移量说明arraypg_result_seek(resource$result,int$offset)pg_result_seek()在结果资源中设定内部行偏移量

标签: PHP:pg_send_execute()的用法_PostgreSQL函数

本文链接地址:https://www.jiuchutong.com/biancheng/281448.html 转载请保留说明!

上一篇:PHP:pg_send_prepare()的用法_PostgreSQL函数

下一篇:PHP:pg_select()的用法_PostgreSQL函数

  • 偶然所得税什么时候颁布
  • 所得税优惠政策最新2022
  • 工资个人所得税标准表
  • 公司购买了地板可以退吗
  • 怎么从税控系统导出明细
  • 金蝶美金账户怎么开
  • 会议费怎么做会计分录
  • 贷款逾期的本金怎么计算
  • 境外企业向境内提供国际运输服务核定征收的企业所得税
  • 向非金融企业借款200万元
  • 工商年报中纳税总额包括工会经费吗
  • 实习生需要缴纳个税吗?
  • 哪些进项税不能转出
  • 个人承包工程如何合理避税
  • 付款凭证和记账凭证一样吗
  • 不计入工资薪金所得的有哪些补贴
  • 实物出资需要发票吗
  • 现金福利支出需要申报个税吗
  • 商业承兑汇票是谁签发的
  • 亏损企业能否享受失业金
  • 企业销售应如何做
  • 最新版小企业会计准则是哪一年的
  • 长期待摊费用科目还用吗
  • 路由器的默认网关在哪里看
  • 增值税一般纳税人和小规模纳税人的区别
  • wordpress.org
  • 烟花绽放的除夕夜题目
  • 进项发票过期了怎么办
  • 毕业设计基础
  • controller层,service层,dao
  • 叮咚你有一份好运请查收图片
  • yii框架搭建
  • phpcms建站教程
  • 02-MyBatis-Plus
  • 购买的无形资产交印花税吗?
  • MySQL数据库存储引擎
  • 费用报销审批单和费用报销单区别
  • 公司收到个人汇款怎么开发票
  • 企业其他应收款包括哪些
  • 注销时其他应付款借方余额怎么账务处理
  • 流转税怎么核算
  • 用于企业职工福利有哪些
  • 个税滞纳金影响企业吗
  • 弃置费用预计负债的会计处理
  • 购买的材料入库属于什么会计科目
  • 外贸公司收取国家税费吗
  • 报废车收到的钱怎么做账
  • 购买设备怎么开专票
  • 新公司现金日记账怎么记账的
  • win8改win7怎么改
  • 启动mac问号文件夹闪烁怎么办
  • 使用移动硬盘快速启动
  • bearshare.exe进程安全吗 bearshare是什么进程
  • win7任务栏快捷启动如何设置
  • synchost.exe - synchost是什么进程 有什么作用
  • crossfire.exe是什么
  • win1021年更新
  • number mac
  • linux批量管理平台
  • centos怎么编写c语言
  • windows7右下角网络图标不见了怎么办
  • win101903更新安装失败
  • win7文件和打印机共享
  • Android自定义控件,切换APP再切回来控件消失了
  • nodejs爬取数据
  • perl 排序
  • 下面有关js中call和apply的描述,错误的是
  • python中OrderedDict的使用方法详解
  • Vuforia 4.0 beta——Object Recognition (一)
  • javascript操作dom对象
  • particular粒子怎么用
  • android gradle task dependence
  • python多线程爬虫代码
  • 基于JAVASCRIPT实现的可视化工具是
  • python的redis
  • 如何加强税务系统财务管理工作
  • 青岛怎样网上交医保
  • 马达加斯加秒懂百科
  • 一般纳税人认定书
  • 如何进行税务筹划的方法
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设