title: Can't use database query in codeigniter and oracle
body: <p>I already set up my connection to oracle 11g, I can see the log-in page, but when I proceed to log-in, no record display or I can't log-in. I tried to put code to check if I'm connected to database when loading the model. If return TRUE then Im connected, but it always return FALSE and show the echo 'No database selected'.
  What would be the possible cause? Are there any differences on creating queries using mysql and oracle? Do I need to put commit on my code when selecting queries? </p>
  
  <p>Here's my connection. It worked and show the default page.</p>
  
  <p>database.php</p>
  
  <pre><code>$tnsname = '(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.112)(PORT = 1521))
      (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE)))';
  $db['default']['hostname'] = $tnsname;
  $db['default']['username'] = 'test';
  $db['default']['password'] = 'testpass';
  $db['default']['database'] = 'testdb';
  $db['default']['dbdriver'] = 'oci8'; //Oracle 11g
  $db['default']['dbprefix'] = '';
  $db['default']['pconnect'] = TRUE;
  $db['default']['db_debug'] = TRUE;
  $db['default']['cache_on'] = FALSE;
  $db['default']['cachedir'] = '';
  $db['default']['char_set'] = 'utf8';
  $db['default']['dbcollat'] = 'utf8_general_ci';
  $db['default']['swap_pre'] = '';
  $db['default']['autoinit'] = TRUE;
  $db['default']['stricton'] = FALSE;
  </code></pre>
  
  <p>Here's my code selecting log-in</p>
  
  <pre><code>&lt;?php
  
  class User_db extends CI_model {
  
      public function get_record($username, $password) {
          if ($this-&gt;load-&gt;database('default')==FALSE)
          {
             exit('No database connection!');
          }
          $query=$this-&gt;db-&gt;get_where("tbl_user", array("username"=&gt;$username, "password"=&gt;md5($password)));
          if($query-&gt;num_rows()==1) {
              return $query-&gt;result();
          }
          else {
              return FALSE;
          }
      }
  }
  </code></pre>