位置: 编程技术 - 正文

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

  • 未交增值税借贷方负数表示
  • 月末计提无形资产的折旧
  • 差旅费哪些可以抵扣进项税
  • 增值税申报表与财务报表不一致
  • 减免城建税税款会计分录
  • 主营业务收入开普票怎么记账
  • 小规模纳税人的增值税账务处理
  • 分公司亏损是否也分摊所得税
  • 新公司接手之前公司的固定资产
  • 借给股东的借款怎么做账
  • 公司将固定资产卖出,要交什么税
  • 文化建设事业费按季度申报吗
  • 公司发的现金
  • 外籍人士劳务费怎么交税
  • 销售折扣和销售折让的账务处理
  • 什么是往来科目
  • 企业所得税减免政策
  • 记账凭证填制的内容
  • 增值税专用发票丢了怎么补救
  • 房屋出租何时缴纳房产税?
  • 个人所得税应纳税额计算表图片
  • 股权转让相关手续
  • 如何进行网络测试网速测试
  • 筹备期废品回收会计分录
  • 登陆qq网页版手机会有提示吗
  • 预付款挂账什么意思
  • 如何通过u盘重启
  • linux 去除换行
  • 股东的车辆保险费可在公司报销?
  • 自制原始凭证包括哪些凭证
  • php数组转js数组
  • 小程序怎么自定义tabbar
  • 工业企业成本怎么结转
  • 百慕大玛丽号
  • 即征即退进项税转出
  • android常用的集成开发工具有
  • vue2.0安装
  • javascript js
  • lvm命令详解
  • 数学建模python 怎么用
  • 是否就地汇总纳税
  • 非居民纳税人183天新税法
  • 长期待摊费用如何处理
  • 个体工商户加盟店名字和营业执照不符合
  • druid数据库连接池
  • 织梦如何使用
  • 其他收益算营业收入吗
  • 绿化养护合同交不交印花税
  • 税务局季度报表利润表
  • 获取sqlsession
  • 金税三期税收管理系统打印控件
  • 企业选择简易征收方案
  • 开票金额大于收入增值税申报表填写
  • 印花税缴款了发票怎么查
  • 资产负债表金额的来源一般是
  • 企业间借贷是否合法2018
  • 怎么看发票的凭证号
  • 负债表预付账款怎么填
  • 慈善捐款流程
  • 投资性房地产公允价值小于账面价值
  • redis 和 mysql 的数据不一致怎么办
  • haozipsvc.exe是什么
  • linux中chkconfig命令的作用
  • mac的itunes怎么下载歌曲
  • ubuntu安装chrom
  • 如何升级win
  • 迅雷看看电脑版 下载
  • win10多用户独立
  • ExtJS 2.0实用简明教程 之Ext类库简介
  • node.js cookie-parser之parser.js
  • unity 游戏开发教程
  • unity3d地图定位
  • [置顶]马粥街残酷史
  • textview不换行
  • Tiled GPU perf. warning: RenderTexture color surface (0x0) was not cleared/discarded
  • jquery怎么写
  • jquery当前时间
  • js倒计时秒杀
  • 保税工厂和非保税工厂的区别
  • 云南省税务局召开的会议
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设