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

This is wrong CodeIgniter CI_Model has no constructor so you cannot use 
PHP Code:
parent::__construct(); 

This is how it should be, see how the class name is ucfirst uppercase it also needs to be saved that way.
PHP Code:
class Dep_models extends CI_Model
{
 
   private $oracle_db;

 
   public function __construct() //model construct function
 
   {
 
       $this->oracle_db $this->load->database('oracle',true); // oracle db
 
   }

 
   public function getDept()
 
   {
 
       $query $this->oracle_db->get('departments')
 
                     ->result();

 
       return $query;
 
   }


Of course you would need to add error checking on all of your database code.
Use Google to search for what you need.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Messages In This Thread
RE: getting message: oci_execute(): ORA-00942: table or view does not exist - by InsiteFX - 11-08-2018, 10:05 AM



Theme © iAndrew 2016 - Forum software by © MyBB