位置: 编程技术 - 正文

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

  • 公司向个人借款是否合法
  • 一张发票能分开做帐务处理吗
  • 劳务派遣的开票规范
  • 申报个税需要扣除公积金和社保吗
  • 提供有形动产租赁服务适用税率为13%
  • 无形资产报废的例题
  • 上一年度凭证不填可以吗
  • 房地产开发企业预收款预缴增值税
  • 跨年的预付账款如何冲销
  • 收到联营单位投入的设备一台
  • 企业销售货物收入没有银行流水
  • 软件技术服务合同需要备案吗
  • 小规模纳税人需要交哪些税
  • 建筑企业预交增值税税务筹划案例
  • 销售依据
  • 租金收入增值税纳税义务
  • 税号里的0是字母还是数字
  • 吸收合并后被合并的公司
  • 公司绿化购买的苗木如何进行账务处理?
  • 测试账户收入怎么做
  • 建筑业可以开电费发票吗
  • 金税盘发票报送状态未报送
  • 委托代销商品账簿模板
  • 实收资本和注册资本必须一致吗
  • 佣金代扣代缴增值税还有附加税吗
  • smart制作
  • 酒店装修期间的费用如何核算
  • php抓取
  • php similar_text()函数的定义和用法
  • 详解16型人格
  • 红字发票进项转出当期
  • 租金和物业管理费税率
  • 固定资产提前报废当月计提折旧吗
  • 数据库锁面试题
  • javascript js
  • unplugin-auto-import/vite
  • 增值税发票认证不了怎么回事
  • @enable
  • python输入三个数判断能否构成三角形
  • 国有资产划转实施方案
  • 城镇土地使用税优惠政策
  • 票据权利的取得要件
  • 发票查询密码区空白怎么回事
  • 固定资产处置怎么计算
  • 数据库触发器db2什么意思
  • 主营业务收入和销售费用的区别
  • 小微企业需要专职安全员吗
  • 公司减少注册资本的条件和程序
  • 除湿机计入固定费用吗
  • 资产减值准备是资产的备抵科目吗
  • 价内税与价外税的计算公式
  • 公司按最低标准交社保可以申请补偿吗
  • 财务费用手续费借贷方向
  • 空头支票是什么数字
  • 账本页面设置
  • winxp和win7共享
  • macbookair怎么开启
  • linux系统垃圾怎么清理
  • linux命令行怎么查看公网ip
  • ha1.dll丢失开不了机
  • ubuntu命令行查找文件
  • 恢复已删除的聊天记录微信
  • win7如何设置鼠标
  • windows8.1rt
  • 什么是边角料
  • win7无法远程桌面win10
  • win7系统电脑开机密码怎么设置
  • win8 远程桌面
  • cocos2dx4.0入门
  • jquery中的事件
  • css li横向显示
  • android studio 开发语言
  • javascript 类
  • 货车附加费多少钱
  • 云南省税务局网上办税服务厅官网
  • 常州市三免卡
  • 呼和浩特新城区政府官网
  • 郑州金水区税务大厅电话
  • 地方公安局归谁管
  • 公司换届审计一般要多久
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设