• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Database Error w/o error number in the DB_driver.php

#4
[eluser]Unknown[/eluser]
This is brilliant - and it fixed my Oracle / CI problem. Thanks!

[quote author="Lehbyos" date="1342713329"][quote author="ndsadona" date="1323218468"]
(snip)

Please, look at the SQL query generated by CI:
Code:
SELECT * FROM "project_users" WHERE "userid" = 'user1' AND "password" = 'iamuser1'

Note that the table names and table fields has double quotes, and that the reason of the issue: in a oracle SQL query, you DONT escape the name of the identifiers.

Looking in the source of CI, de base class CI_DB has a flag indicating that identifiers MUST be escaped. This is not necessary in Oracle, so i just add this attribute in system/database/drivers/oci8_diver.php...

Code:
var $_protect_identifiers = FALSE;

(If someone else want to test it, I put the line above before the method db_connect() on the OCI 8 Driver).

(snip)

Regards[/quote]


Messages In This Thread
Database Error w/o error number in the DB_driver.php - by El Forum - 12-06-2011, 05:41 PM
Database Error w/o error number in the DB_driver.php - by El Forum - 07-19-2012, 08:55 AM
Database Error w/o error number in the DB_driver.php - by El Forum - 09-16-2012, 12:01 AM
Database Error w/o error number in the DB_driver.php - by El Forum - 10-17-2013, 10:10 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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