位置: 编程技术 - 正文

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

  • 税捷财税官网
  • 公司刚成立没有收入但是有支出怎么记账
  • 差旅费哪些可以抵扣进项税
  • 租厂房需要交租赁税吗
  • 出售其他债权投资
  • 中药和中药饮片效果一样吗
  • 新公司利润表怎么填
  • 发票服务名称都有什么
  • 注册资本余额为100万亿元
  • 有限合伙企业转让投资股权
  • 跨境电商怎么交税
  • 异地出租
  • 公司委托财务去银行办理业务
  • 工地水电包公包料的细节
  • 其他业务收入的核算内容
  • 机关和事业单位哪个好
  • 增值税发票进项抵扣是什么意思
  • 员工个人所得税申报方式选哪个
  • 商品和服务税收编码怎么查
  • 中小企业社保优惠延长政策
  • 审图费发票需要备注吗
  • 个税手续费返还政策文件
  • 缴纳印花税怎么算
  • 固定资产折旧计算方法
  • 高新技术企业研发人员比例要求
  • 债务担保可以税前抵扣吗
  • PHP:date_default_timezone_get()的用法_Date Time函数
  • thinkphp 多数据库
  • 使用二氧化碳灭火器时人应该站在什么位置
  • 米尔福德试车场
  • thinkphp django
  • 分页的实现
  • php读取文件内容
  • js对象数据类型有哪些
  • css deep深度选择器
  • 健身房注册公司名称带超字
  • js let与var区别
  • 5年前开的发票退货可以冲红吗?
  • 货款分批付的会计分录
  • 如何查询发票领购日期
  • 增量留底退税怎么比增值税高
  • 纳税减免申报
  • sql server删除表命令
  • 下列行为免征增值税的有
  • 发票金额跟实际转账金额不一样该怎么办
  • 生产设备改扩建会计分录
  • 本年利润必须转入利润分配吗
  • 购买土地缴纳契税会计分录
  • 跌价准备如何入库
  • 研发人员工资是实发还是应发
  • 商贸公司批发零食怎么样
  • 公司向个人租赁房屋办公要交税吗?
  • 月末如何计提增值税附加及增值税
  • 建筑企业成本核算方法
  • 损益类账户属于资产还是负债
  • 网上购物退款后未退回物品怎么投诉
  • 特殊销售方式下的销售额确认图文怎么做
  • 直接费用的定义
  • 分支机构需要单独设立账簿吗
  • mysql 全量备份
  • mysql用处
  • win7小技巧
  • windowsxp教程
  • ubuntu有线正在连接
  • win8怎么禁止弹窗
  • window10如何修改电脑名称
  • linux中rename命令详解
  • ztree默认选中
  • linux列操作
  • javascript产生随机数
  • JavaScript File API实现文件上传预览
  • JavaScript中的数据类型分为两大类
  • 实用的app都有哪些
  • js数组排序方法sort
  • jquery获取当前日期yyyymmdd
  • 电子税务局税务数字证书登录
  • 河北省职称证书电子版
  • 广西税务登记查询网站
  • 企业所得税
  • 化妆品关税怎么算
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设