Welcome Guest, Not a member yet? Register   Sign In
Database Error w/o error number in the DB_driver.php
#3

[eluser]Unknown[/eluser]
[quote author="Lehbyos" date="1342713329"][quote author="ndsadona" date="1323218468"]
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).


After that, I can use the models and querys exactly the same as the tutorial shows:
Code:
<?php
class Personal_model extends CI_Model {
public function __construct(){
  $this->load->database();
}

public function get_personal(){
  $consulta = $this->db->get('personal');
  return $consulta->result();
}
}
?>


Regards[/quote]

Thanks Lehbyos, I tried it on my local machine and it is working correctly right now Smile


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



Theme © iAndrew 2016 - Forum software by © MyBB