![]() |
getting message: oci_execute(): ORA-00942: table or view does not exist - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: getting message: oci_execute(): ORA-00942: table or view does not exist (/showthread.php?tid=72115) |
getting message: oci_execute(): ORA-00942: table or view does not exist - Ahmed Haroon - 11-08-2018 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 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 RE: getting message: oci_execute(): ORA-00942: table or view does not exist - InsiteFX - 11-08-2018 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 Of course you would need to add error checking on all of your database code. Use Google to search for what you need. RE: getting message: oci_execute(): ORA-00942: table or view does not exist - php_rocs - 11-08-2018 @ahmed Haroon, What does your config file look like? Your hostname should be something along this line... 'hostname' => '123.345.456.21:1521/SSID', RE: getting message: oci_execute(): ORA-00942: table or view does not exist - dave friend - 11-08-2018 (11-08-2018, 10:05 AM)InsiteFX Wrote: This is wrong CodeIgniter CI_Model has no constructor so you cannot use I admit I'm being pedantic here, but CI_Model does have a constructor. It is empty, but it's there. So you're right in the sense that making the call is pointless. RE: getting message: oci_execute(): ORA-00942: table or view does not exist - Ahmed Haroon - 11-08-2018 (11-08-2018, 10:05 AM)InsiteFX Wrote: This is wrong CodeIgniter CI_Model has no constructor so you cannot use thanks very much for reply and guidance. still getting same error, i am posting here code of files as below: in Controller folder, file name Depts.php PHP Code: <?php in Model folder, Dep_Models.php PHP Code: <?php in config folder, file database.php PHP Code: $active_group = 'oracle'; Error: Quote:A PHP Error was encountered if anything else, i can share because all are just Test / Practice files. regards RE: getting message: oci_execute(): ORA-00942: table or view does not exist - Ahmed Haroon - 11-08-2018 (11-08-2018, 10:12 AM)php_rocs Wrote: @ahmed Haroon, thanks for your reply, I have posted above my database.php entry for Oracle database. regards RE: getting message: oci_execute(): ORA-00942: table or view does not exist - InsiteFX - 11-09-2018 Did you save your model with the first character upper case? Dep_models.php RE: getting message: oci_execute(): ORA-00942: table or view does not exist - Ahmed Haroon - 11-09-2018 (11-09-2018, 04:45 AM)InsiteFX Wrote: Did you save your model with the first character upper case? thank you ![]() No, I didn't... RE: getting message: oci_execute(): ORA-00942: table or view does not exist - php_rocs - 11-09-2018 @ahmed Haroon, Are you still getting an error message? Is it working for you now? RE: getting message: oci_execute(): ORA-00942: table or view does not exist - Ahmed Haroon - 11-10-2018 thanks @php_rocs, i already have mentioned in my reply to @InsiteFX that getting same error (also posted program codes and complete errors), now I can test anything on coming Monday if I someone guide me. I have following environment ( on VM ) Win 8.1, Oracle Database 12c Release 2, WAMP current version. also edited file php.ini in Apache to have oci_12c. regards |