位置: 编程技术 - 正文

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

  • 企业借出去的钱收不回来
  • 软件和硬件如何集合使用
  • 货运代理费计入固定资产吗
  • 政府机关车辆拍卖
  • 车辆日常维护费用
  • 员工报销汽油费可以抵扣进项税吗
  • 高新技术企业账务处理注意事项
  • 滞留票的处理
  • 融资租赁的销项税额抵减
  • 个体工商户生产经营所得怎么申报
  • 银行业务结算内容
  • 出口抵减内销产品应纳税额是借方还是贷方
  • 进口内销是什么意思
  • 由母公司承担子公司债务的财务处理怎么做?
  • 新25项工资薪金是什么
  • 统一信用社会代码怎么填
  • 税务改革方向
  • 公司注销还需要登报吗
  • 固定资产抵扣进项
  • 物业公司收空调费怎么交税
  • 年底买车险会便宜吗
  • 增值税收入和所得税收入不一致怎么办
  • win11右下角时间设置
  • 运费从货款中扣除后付款分录怎么做
  • 期末留抵税额退税是什么意思
  • 企业对外股权投资涉及税收
  • 促销费影响主营利润吗
  • 开启自动备份注册表
  • 公司装修款账务处理
  • php array_replace
  • win11系统怎么删除账户
  • win10开机强制进入高级选项怎么退出
  • 增值税税率调整为13%的文件
  • 事业单位成本核算制度
  • vue中数字运算
  • phpinfo()中Loaded Configuration File(none)的解决方法
  • 我的第一次作文400字左右
  • node.js的安装和配置
  • mail命令详解
  • ftpd命令
  • mongodb认证
  • 月末库存商品成本计算
  • 成本和费用有着根本的区别
  • 应交税费核算范围
  • 收到的技术服务费计入什么科目
  • 信用减值损失如何列报
  • 开票金额为什么是负数
  • 应税销售额什么意思
  • 接受母公司捐赠现金分录
  • 城建税多交了怎么办
  • 厂家给的返利应该怎么做会计分录
  • 临时设施属于什么科目
  • 财务费用在贷方,怎么结转到本年利润?
  • 分期付款购无形资产怎么入账?
  • 从别的公司买承兑汇票
  • 企业必须建立哪些制度
  • 在WINDOWS系统中用鼠标拖动非最大化窗口的标题栏可以
  • window正在检查内存
  • xp系统打印任务一闪就没有了
  • win2000注册表
  • sysscjh.exe是什么文件
  • win7怎么不显示桌面图标
  • win10系统哪款好
  • w10点击没反应
  • msmpeng.exe是什么进程
  • WIN10系统安装教程
  • win10切换登陆账户为administrator
  • Win7系统关闭自动更新
  • git 常用指令
  • Vuforia 4.0 beta——Object Recognition (三)
  • jquery封装的函数
  • JavaScript 事件绑定及深入
  • javascript常见问题
  • python django
  • 增值税月报怎么报
  • 党建引领安全宣传美篇幼儿园
  • 企业税务登记是什么证件
  • 实木地板什么
  • 对外销售产品
  • vat税怎么做分录
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设