getting message: oci_execute(): ORA-00942: table or view does not exist |
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
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. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(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.
(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
(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
Did you save your model with the first character upper case?
Dep_models.php What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
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 |
Welcome Guest, Not a member yet? Register Sign In |