Welcome Guest, Not a member yet? Register   Sign In
solution to using database functions with oracle
#1
Thumbs Down 
(This post was last modified: 04-16-2015, 10:29 AM by ciadmin.)

when using codeigniter functions with oracle we will have problem that it will add ( " )  to table names

{EDITED - Your original post promoted a nono}

An external suggestion was to change the escape character, but that would mean modifying a core CodeIgntier file, which is not an acceptable practice.
Reply
#2
Sad 

In CI 3.0 that variable is protected, so that we cannot change it from application... any other solution?

Ref: https://github.com/bcit-ci/CodeIgniter/issues/3757
Reply
#3

(This post was last modified: 04-14-2015, 11:39 AM by Bassam.)

try to use capital letters in table names
for example :
dont write
PHP Code:
// dont write 
$this->db->get('employee'); 
but write
PHP Code:
// but write
$this->db->get('EMPLOYEE'); 

and the same for columns name
Reply
#4

DO NOT EVER SUGGEST MANUAL MODIFICIATIONS OF THE FRAMEWORK'S FILES!
Reply
#5

(04-14-2015, 11:38 AM)Bassam Wrote: try to use capital letters in table names
for example :
dont write

PHP Code:
// dont write 
$this->db->get('employee'); 
but write

PHP Code:
// but write
$this->db->get('EMPLOYEE'); 

and the same for columns name

This is not a good idea unless they were defined this way to begin with. SQL keywords are case-insensitive, but long-standing convention means most people use all-caps for them. The same convention usually defines table and column names in all-lowercase, making it easier to distinguish the difference in raw SQL. However, whether table and column names are case-sensitive is sometimes a configurable option, and, therefore, may change from one environment to the next.

For these reasons, the most important thing to remember is to be consistent with your table and column names. Never suggest to someone that they should change the case of these names in their code unless there is evidence that they have been inconsistent.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB