Welcome Guest, Not a member yet? Register   Sign In
Problem Oracle
#1

[eluser]Unknown[/eluser]
I am new to the forum and I'm also learning to use CI. I have a problem, and I'm trying to connect to an Oracle database and a MySQL database at the same time. With the MySQL database I had no problem, the problem arose when trying to connect to the Oracle database, the error is as follows:

Code:
Severity: Warning
Message: ociparse() expects parameter 1 to be resource, boolean given
Filename: oci8/oci8_driver.php
Line Number: 186

Here is my config options on database.php

Code:
$tnsname = '(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.111.100.101)(PORT = 1521))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = XE)))';

$db['default']['hotname'] = $tnsname;
$db['default']['username'] = 'MyUser';
$db['default']['password'] = 'MyPass';
$db['default']['database'] = '';
$db['default']['dbdriver'] = 'oci8';

And this is my Model:

Code:
class Membership_model extends CI_Model {
  function validate() {
    $qry = $this->db->query("SELECT USUARIO, NOMBRES, APELLIDOS FROM WMS_USUARIOS WHERE USUARIO = '".$this->input->post('username')."'");
    foreach ($qry->result_array() as $row) {
      echo $row['NOMBRES'].' '.$row['APELLIDOS'];
    }
}
}

I hope you guys can help me.

P.S. Sorry for my bad english Sad




Theme © iAndrew 2016 - Forum software by © MyBB