位置: 编程技术 - 正文

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

  • 红冲去年暂估的费用怎么做账
  • 两个账户往来款怎么做现金流量表
  • 税控盘如何统计开票金额
  • 权益筹资额计算公式
  • 非盈利组织是什么
  • 进项税加计扣除账务处理
  • 完税凭证和发票一起打印
  • 负债与递延收益的区别
  • 房屋估价入账需要计算什么税款?
  • 专利费代缴
  • 城镇土地使用税纳税义务发生时间
  • 增值税专用发票有效期是多长时间
  • 分公司背书给总公司
  • 公司购买宿舍楼申请书
  • 购物车内广告收入应该怎么缴税?
  • 事业单位取得的财政拨款免税吗
  • 固定资产分期抵扣怎么申报增值税?
  • 固定资产大修理和更新改造的区别
  • 哪些记账凭证
  • 购进原材料没有发票怎么办
  • 评标费由谁支付
  • 认缴制度下实收资本确认条件
  • Win11安装如何跳过以太网
  • 简易计税的方式
  • linux mint 20.1安装
  • vagrant 安装centos7
  • PHP:apache_get_modules()的用法_Apache函数
  • php cgi
  • 涉税服务实务会花多少时间完成
  • php面向对象和面向过程
  • php 并发 解决方案
  • php测验
  • 来料加工 增值税
  • 图书发票怎么开
  • php魔术常量有多少
  • mysql集群三种方式
  • 以小物件为话题写出背后的故事
  • 生产车间领用工具
  • vgchange命令
  • 命令压缩文件
  • 区块管理办法
  • 本月确认收入 发票下月开
  • java自增自减运算符的规则
  • python迭代器有什么用
  • 小规模纳税人开具增值税专用发票
  • 运输发票怎么做账
  • 个人所得税是可以全部退回吗
  • 发票报销哪些要素不能少
  • 无票收入增值税怎么申报
  • 开票怎么凑齐小票
  • 半成品加工需要什么手续
  • 强化劳务输出
  • 进项税转出企业所得税调减么
  • 应收账款占比高受哪些因素影响
  • 损益类所得税费用
  • 日常费用报销管理制度
  • win10蓝屏怎么修复系统
  • win2003回收站
  • 超级本可以玩游戏吗
  • win8怎么禁止弹窗
  • win7 虚拟磁盘
  • win8如何进入metro界面
  • org.cocos2d.straydiary
  • OpenGL_砖块着色案例
  • unity3d入门教程中文图解
  • eevee引擎
  • cmd网络管理命令的功能和用法
  • 打开指定文件夹命令
  • base如何使用
  • nodejs增删改查
  • android设计模式的应用场景
  • js判断路径下图片是否存在
  • linux基本代码
  • java中主要使用unicode编码方式
  • js中input怎么用
  • c#string stringbuilder
  • 个人所得税发票
  • 现在德国的普通话怎么样
  • 日照公交305发车时间表
  • 宁夏地税局电话
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设