”或“在PHP的Postgres查询中 [英] ' or " in PHP's Postgres queries

查看:79
本文介绍了”或“在PHP的Postgres查询中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


  1. 何时应在PHP pg查询中使用字符'?

  2. 何时应使用字符在PHP pg查询中?

  1. When should you use the character ' in PHP pg queries?
  2. When should you use the character " in PHP pg queries?

此问题基于此答案

推荐答案

进入PostgreSQL查询时,必须使用'

Into a PostgreSQL query, you must use '

在PHP中构建查询时,可以使用'或

When you build a query in PHP, you may use ' or "

"select * from table where id = 'me'"

'select * from table where id = \'me\''

这篇关于”或“在PHP的Postgres查询中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆