位置: 编程技术 - 正文

PHP:pg_escape_literal()的用法_PostgreSQL函数

编辑:rootadmin
pg_escape_literal

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

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

(PHP 5 >= 5.4.4)

pg_escape_literal — Escape a literal for insertion into a text field

说明 string pg_escape_literal ([ resource $connection ], string $data )

pg_escape_literal() escapes a literal for querying the PostgreSQL database. It returns an escaped literal in the PostgreSQL format. pg_escape_literal() adds quotes before and after data. Users should not add quotes. Use of this function is recommended instead of pg_escape_string(). If the type of the column is bytea, pg_escape_bytea() must be used instead. For escaping identifiers (e.g. table, field names), pg_escape_identifier() must be used.

Note:

This function has internal escape code and can also be used with PostgreSQL 8.4 or less.

参数 PHP:pg_escape_literal()的用法_PostgreSQL函数

connection

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().

data

A string containing text to be escaped.

返回值

A string containing the escaped data.

范例

Example #1 pg_escape_literal() example

<?php//Connecttothedatabase$dbconn=pg_connect('dbname=foo');//Readinatextfile(containingapostrophesandbackslashes)$data=file_get_contents('letter.txt');//Escapethetextdata$escaped=pg_escape_literal($data);//Insertitintothedatabase.Notethatnoquotesaround{$escaped}pg_query("INSERTINTOcorrespondence(name,data)VALUES('Myletter',{$escaped})");?>

参见

pg_escape_identifier() - Escape a identifier for insertion into a text field pg_escape_bytea() - 转义 bytea 类型的二进制数据 pg_escape_string() - 转义 text/char 类型的字符串

PHP:pg_escape_identifier()的用法_PostgreSQL函数 pg_escape_identifier(PHP5=5.4.4)pg_escape_identifierEscapeaidentifierforinsertionintoatextfield说明stringpg_escape_identifier([resource$connection],string$data)pg_escape_identifier()escapesaidentifi

PHP:pg_copy_to()的用法_PostgreSQL函数 pg_copy_to(PHP4=4.2.0,PHP5)pg_copy_to将一个表拷贝到数组中说明arraypg_copy_to(resource$connection,string$table_name[,string$delimiter[,string$null_as]])pg_copy_to()将一个表拷贝到数

PHP:pg_copy_from()的用法_PostgreSQL函数 pg_copy_from(PHP4=4.2.0,PHP5)pg_copy_from根据数组将记录插入表中说明boolpg_copy_from(resource$connection,string$table_name,array$rows[,string$delimiter[,string$null_as]])pg_copy_from()将

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

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

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

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

  • 企业自建房产缴契税吗
  • 私立幼儿园需要纳税吗
  • 股东分红的账务处理结转
  • 2020小规模纳税人增值税税率
  • 长期待摊一般摊几年
  • 上年结转未抵扣
  • 企业理财收益要交哪些税
  • 出口退税中哪些是免税的
  • 原始发票丢失怎么报销
  • 法人的往来款可以转为实收资本吗?
  • 送现金券活动方案
  • 代扣代缴个人所得税计入哪个科目
  • 通用机打发票上面为什么不体现税率
  • 建筑业企业包括哪些企业
  • 中意装饰工程有限公司怎么样
  • 安装设备用的材料计入什么科目
  • 合伙人投入的资金怎么记账
  • 经营性现金净流量是什么意思
  • 设备定金计入哪个科目
  • 工会经费返还账务处理,另记账么
  • 研发费用的
  • 个人将房产无偿赠与他人应交个人所得税吗
  • 电费预付之后又退回来了
  • google搜索打不开怎么办
  • 实收资本账户的核算内容是什么
  • Windows 11 Build 22000.176 (KB5006050) 更新推送(附更新内容+安装)
  • 怎么看腾讯游戏
  • win10 累积更新
  • 外币债券汇兑损益怎么算
  • 二手房过户提供发票好还是不提供
  • 伊吕波赛道
  • 本文虚构
  • 支付境外佣金交多少税
  • 收到车险发票含增值税吗
  • 异地开办分公司流程
  • 基于Selenium的自动化测试平台设计与实现
  • 无形资产摊销怎么算月摊销额
  • css鼠标移入移出切换事件
  • PyTorch深度学习实战 | 神经网络的优化难题
  • sftp命令大全
  • php加密zend
  • phpcms模块
  • 电话订票起售时间
  • 原材料暂估入库成本结转处理
  • 借预收账款贷其他应付款什么意思
  • sql自增1
  • 电脑访问另一台电脑访问权限
  • 总账和成本哪个工资高
  • 以前年度损益调整结转到哪里
  • 财务费用报销流程图word
  • 融资性售后回租承租方出售资产为什么不缴纳增值税
  • 电费已支付未充值
  • 资产报废需要税费吗
  • 直接成本包括哪些
  • 制造费用按什么设置明细
  • 买水果送礼
  • 序时账是明细账吗
  • 基于sql server的大数据审计分析应用
  • 数据库中的内容怎么换行
  • vista win10
  • 笔记本带u
  • windows 11安全模式
  • windows8出现蓝屏
  • win7显示
  • win8设备管理器在哪里打开
  • linux shell 函数参数
  • centos6.5升级到7.2
  • linux系统解压tar.gz文件
  • dos到windows
  • css示范例子
  • 关于减肥的好方法
  • shell 方法调用
  • 很好的资源学习入口_android
  • python发送信息到微信
  • 源码搜索
  • 企业吸收合并都包括什么
  • 房产交契税网上可以交吗
  • 个人所得税申报怎么申报
  • 如何在国税网下载发票
  • 如何查询税控盘是否注销成功
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设