Welcome Guest, Not a member yet? Register   Sign In
getting message: oci_execute(): ORA-00942: table or view does not exist
#1

hi all,

I am very new to Codeigniter, I am creating a Form to get Oracle's default HR schema table departments data but it showing error:

Message: oci_execute(): ORA-00942: table or view does not exist

the same things working for MySQL database, with just change 2 lines in model, my model file is as below:

Quote:<?php
//public $db;

class dep_models extends CI_Model{

function __construct()//model construct function
{
    parent::__construct();
    $this->oracle_db=$this->load->database('oracle',true); // oracle db
    //$this->db=$this->load->database('default',true); // mysql db
}

function getDept(){
   //return $this->oracle_db->get('departments')->result();
   $result=$this->oracle_db->get('departments'); // oracle db
   //$result=$this->db->get('departments'); // mysql db
   return $result;
}
}
?>

when un-comment lines with "mysql db" and simply refresh page, it works fine but for "oracle db" it is showing error but it seems connected successfully. 
please help as i am working on Oracle database.

regards
Reply


Messages In This Thread
getting message: oci_execute(): ORA-00942: table or view does not exist - by Ahmed Haroon - 11-08-2018, 04:21 AM



Theme © iAndrew 2016 - Forum software by © MyBB