位置: 编程技术 - 正文

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

  • 个人开具服务费发票税率
  • 二手房交易需要购房发票吗
  • 放弃退税理由是什么
  • 以前年度损益调整在借方是什么意思
  • 对公账户转到个人账号能提供发票吗?
  • 公司购买了地板可以退吗
  • 哪些进项税额可以转出
  • 税金及附加有啥
  • 多开票要交多少税
  • 六个点的税率是小规模吗
  • 研发支出转入管理费用摘要
  • 实收资本不到账如何做凭证
  • 房地产商品房销售营业税怎么算
  • 营改增后企业要交哪些税
  • 单位缴交的社保和医保还要交其他费用吗
  • 新企业残保金免交三年超过30人
  • 累计折旧的计提和处理的分录
  • 怎么确认投资性资金
  • 投资理财产品的优势和劣势
  • 上期金额为上年同期报表的本期金额
  • 餐饮的成本核算表格模板
  • mac切换不了中文怎么回事
  • PHP:stream_encoding()的用法_Stream函数
  • 冲减其他应收款摘要怎么写
  • 前端如何调用后端方法
  • crontab不执行的原因和解决方案
  • 卡齐兰加国家公园地理位置
  • 交易性金融资产的入账价值
  • 达特穆尔动物园
  • php生成guid
  • php plates
  • tf fans club
  • 智能优化算法可以用到哪里
  • 固定资产处置的三种方式
  • vf中显示命令
  • 盘点时发现存货怎么处理
  • 应收账款提了坏账后收回
  • python的顺序
  • echarts 官网
  • 帝国cms使用手册
  • 现金流量表怎么填写
  • 工会经费通过应交税费科目核算吗
  • 如何安装sql server2022
  • 应付股利是否影响未分配利润
  • 制造企业预提短期借款利息的会计科目处理
  • 企业筹办期怎么做账最合理
  • 个人所得税年度累计扣税规则
  • 小规模纳税人适用什么会计准则
  • 增值税专用发票的税率是多少啊
  • 预收账款可以长期挂账吗
  • 单位租赁个人房子怎么缴纳房产税
  • 税前扣除怎么理解
  • 商贸企业固定资产可以一次性扣除吗?
  • 冲销应付账款暂估应付账款的分录怎么做
  • 财务人员如何审合同课件
  • 本年利润的会计分录
  • 贴现办理流程
  • sql server 数学函数
  • win8.1纯净版下载
  • ubuntu 装系统
  • 监控iphone软件
  • windows server 2016正式版下载激活安装设置教程
  • CentOS 5.4 rsync+inotify配置触发式(实时)文件远程同步
  • linux如何设置用户自己的工作环境
  • linux在实际工作中的应用
  • 打开应用通知栏
  • css写文字
  • jquery查找方法
  • nodejs socket框架
  • unity3d手机怎么打开
  • jquery瀑布流代码
  • 安卓调用系统相机
  • jquery有自定义选择器吗
  • UIAutomator在AndroidStudio中的使用
  • 怎么查询企业的联系方式
  • 动车票电子发票如何获取
  • 按季度 税费申报日期
  • 公司被分立,应将分立后的单位
  • 一般纳税人申请流程
  • 北京市税务局热搜
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设