• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ActiveRecord & oci8 driver adding double quotes to table names and fields

#1
[eluser]Andre83[/eluser]
I've just noticed that using ActiveRecord and the oci8 driver, writing this piece of code
Code:
$this->db->get('mytable')
produces the statement
Code:
SELECT * FROM "mytable"
, that fails miserably when executed.

This happens because the
Code:
$_escape_char
variable at line 49 of oci8_driver.php equals
Code:
"

Setting it to an empty string solves the problem; but is this really a possibile solution, or can it be done differently without having to patch the driver?

#2
[eluser]Unknown[/eluser]
i have the same problem~~ :exclaim:

#3
[eluser]Unknown[/eluser]
This really needs to be documented more clearly or mentioned in the tutorial, maybe as a footnote. Thank you Andre for posting the solution.

#4
[eluser]CroNiX[/eluser]
Please feel free to add it to the documentation on Github and issue a pull request. That's the best chance for additions or improvements to CI.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.