位置: 编程技术 - 正文

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

  • 如何查询纳税人状态是否正常
  • 税务师考试咨询电话
  • 老板自己出钱买股票
  • 经营性负债的作用
  • 哪些进项税额不能加计抵减
  • 应付账款尾差怎么算
  • 小规模一季度不超过45万
  • 金税盘递减税款2022
  • 有税控盘怎么领发票
  • 定额发票上可以盖章吗
  • 企业所得税的税率
  • 城市规划部门收取的市政建设配套费是否作为契税的征税基数
  • 事业单位缴纳税款比例
  • 商业承兑汇票有风险吗
  • 支票结算的账务处理
  • 现金折扣销售退回的会计分录
  • 小企业作废的发票怎么开
  • 应交税金减免税金需要结转吗
  • 营改增后房地产公司税种及税率
  • 拆迁补偿款使用范围
  • 外国专家工资个税
  • 非增值税应税项目有哪些2023
  • 未达起征点销售额和小微企业免税销售额
  • 运费发票是含税还是不含税
  • 增值税专用发票验票
  • 涉农贷款损失
  • 向分公司拨款如何填现金流量表
  • 软件企业超税负率怎么算
  • 资产减值损失如何结转本年利润
  • 购买库存商品收到发票怎样做分录
  • 税务更正申报需要哪些资料
  • 关联企业借款利息税前扣除
  • 计提个税怎么做
  • 应交税金年终怎么计算
  • 职工福利费汇算清缴怎么填写
  • 预算与决算对比分析
  • 苹果电脑怎么切换中英文
  • php初始化会话
  • 货到付款怎么做账
  • thinkphp d
  • mysql分区分表原理
  • 累计折旧大白话
  • 银行存款向灾区捐款
  • db2udb
  • 6%税点是什么意思
  • 商业企业会计如何记账
  • 专票和普票都是13个点嘛
  • 发票已开不确认收入可以做吗?
  • 小规模企业购入原材料会计分录
  • 车间装修预算表
  • 刚购入的固定资产已使用年限怎么填
  • 行政拨款给工会的账务处理
  • 预收账款要预交税金吗
  • 研发费用允许加计扣除的标准
  • 负债项目的排列顺序
  • 车辆买的商业险全险,车辆出了事故,保险公司怎么赔
  • 新建厂房需要缴纳什么税
  • 利润表的编制方法和步骤实操
  • 个人独资企业交什么税
  • 用于职工福利的增值税怎么计算
  • mysqlvarchar汉字
  • zmweb.exe是什么进程
  • bios cmos设置
  • linux限制用户登录
  • pptp和l2tp哪个比较安全
  • 双系统重装win11
  • win7系统笔记本怎么连接wifi
  • centos7网卡
  • centos7 swap大小设多少
  • [置顶] 《翻身称霸》
  • nodejs异步编程及原理
  • jquery的使用步骤
  • jquery easyui插件
  • mongoose操作
  • 安卓view事件分发
  • shell脚本-p
  • jquery keydown
  • jquery日期控件 datepicker
  • 安卓手机命令代码
  • 忘记了密码怎么打开手机
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设