Welcome Guest, Not a member yet? Register   Sign In
change $_escape_char from application [migration problem]
#1

I have various apps working with CI 2.2.x and the OCI8 driver, in which I have to pull the trick of setting the system DB variable $_escape_char to empty, so that case sensitive won't be an issue in the app.

That allows me that queries like this works on Oracle and CI:
Code:
SELECT code, description FROM SALES.EXCHANGE WHERE company = 'GOOG'

but recent version of CI 3.0 made this variable protected, which makes migration a titanic task, due the changes to be made in queries, in variables,  in html forms and perhaps in js code also.

The very simple solution is to change the line in system/database/drivers/oci8/oci8_driver.php but that means that I have to remember that every time I upgrade CI

So... what's the best way to have this from application (not system)?
PHP Code:
$this->db->_escape_char ''
  • since it's protected, we cannot change it,
  • since it's in database class we cannot extend it
... what I'm missing?

Also, why it has to be protected? ('just because' is not a good reason)

More Info: https://github.com/bcit-ci/CodeIgniter/issues/3757
Also: https://github.com/bcit-ci/CodeIgniter/pull/3759
Reply


Messages In This Thread
change $_escape_char from application [migration problem] - by pabloveliz - 04-14-2015, 09:43 AM



Theme © iAndrew 2016 - Forum software by © MyBB