简体   繁体   English

Codeigniter 3 Oracle Set Query Builder 不区分大小写

[英]Codeigniter 3 Oracle Set Query Builder Case Insensitivity

Using Codeigniter 3 at work with Oracle 12c and sporadic uses of the Query Builder class.在 Oracle 12c 中使用 Codeigniter 3 以及偶尔使用 Query Builder 类。

Query Builder is selecting from Oracle with escaped table names.查询生成器正在从带有转义表名的 Oracle 中进行选择。 I would like to configure the class to not do this.我想配置类不这样做。 I'd like this call:我想要这个电话:

$query = $this->db->get('customers');

to go from

select * from 'customers';

to

select * from customers;

in generated SQL.在生成的 SQL 中。

Is there a config item I don't know about or am I going to have to fix one of my coworker's queries every three weeks until the end of time?是否有我不知道的配置项,或者我是否必须每三周修复一次同事的查询,直到时间结束?

You have to use next syntax你必须使用下一个语法

$this->db->select('SELECT * FROM customers', false)->get();

since second parameter in select($tablename, $escape=NULL) method will prevent table name or field names escaping when set to FALSE .因为select($tablename, $escape=NULL)方法中的第二个参数将阻止表名或字段名在设置为FALSE时转义。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM